diff options
author | Reinhard Tartler <siretart@tauware.de> | 2018-02-20 21:50:22 -0500 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2018-02-20 21:50:22 -0500 |
commit | f6d7cfd710de1bf9d4f6eabab45570bc91941ee1 (patch) | |
tree | 6aed4f8606e47c6ef21c5b1d8bbf7cafa694af6e /test/httpserver | |
parent | c81b92946b58b90fe9679a476338e2d2dec8df67 (diff) | |
parent | f28f88e5e72ba1499409047a9d6985eb312c0232 (diff) |
Merge branch 'upstream'
Diffstat (limited to 'test/httpserver')
-rw-r--r-- | test/httpserver/testfiles/httpserver.conf | 5 | ||||
-rwxr-xr-x | test/httpserver/testfiles/testrequests.pl | 9 |
2 files changed, 7 insertions, 7 deletions
diff --git a/test/httpserver/testfiles/httpserver.conf b/test/httpserver/testfiles/httpserver.conf index 1a1c4644..d8c72a3f 100644 --- a/test/httpserver/testfiles/httpserver.conf +++ b/test/httpserver/testfiles/httpserver.conf @@ -1,5 +1,6 @@ - -AddressPrefix = http://localhost:1080 +# Use 127.0.0.1 instead of localhost to force use of IPv4, as that is what the server +# binds to. Windows tends to use IPv6 instead if possible, breaking the test. +AddressPrefix = http://127.0.0.1:1080 Server { diff --git a/test/httpserver/testfiles/testrequests.pl b/test/httpserver/testfiles/testrequests.pl index 4dd3549f..fd4274b4 100755 --- a/test/httpserver/testfiles/testrequests.pl +++ b/test/httpserver/testfiles/testrequests.pl @@ -49,7 +49,8 @@ if($response3->code() != 200) print "Redirected GET request...\n"; my $response4 = $ua->get("$url_base/redirect?key=value"); -exit 4 unless $response4->is_success(); +die "GET ".$response4->request()->url()." failed: ".$response4->content() + unless $response4->is_success(); my $content4 = $response4->content(); @@ -112,13 +113,11 @@ sub check_url my ($c,$url) = @_; unless($c =~ m~URI:</b> (.+?)</p>~) { - print "URI not found\n"; - exit(1); + die "URI not found in response: '$c'\n"; } if($url ne $1) { - print "Wrong URI in content\n"; - exit(1); + die "Wrong URI in content: expected '$url' but found '$1'\n"; } } |