File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/test/java/org/jsoup/integration Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -177,11 +177,19 @@ public void followsRedirectToHttps() throws IOException {
177
177
178
178
@ Test
179
179
public void followsRelativeRedirect () throws IOException {
180
- Connection con = Jsoup .connect ("http://direct.infohound.net/tools/302-rel.pl" ); // to ./ - /tools /
180
+ Connection con = Jsoup .connect ("http://direct.infohound.net/tools/302-rel.pl" ); // to /tidy /
181
181
Document doc = con .post ();
182
182
assertTrue (doc .title ().contains ("HTML Tidy Online" ));
183
183
}
184
184
185
+ @ Test
186
+ public void followsRelativeDotRedirect () throws IOException {
187
+ // redirects to "./ok.html", should resolve to http://direct.infohound.net/tools/ok.html
188
+ Connection con = Jsoup .connect ("http://direct.infohound.net/tools/302-rel-dot.pl" ); // to ./ok.html
189
+ Document doc = con .post ();
190
+ assertTrue (doc .title ().contains ("OK" ));
191
+ }
192
+
185
193
@ Test
186
194
public void followsRedirectsWithWithespaces () throws IOException {
187
195
Connection con = Jsoup .connect ("http://tinyurl.com/kgofxl8" ); // to http://www.google.com/?q=white spaces
You can’t perform that action at this time.
0 commit comments