summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-12-24 00:20:39 +0000
committerChris Wilson <chris+github@qwirx.com>2015-12-24 00:20:39 +0000
commit37ebab492d14d38403ba866cc9ab25a2204f92fd (patch)
treeac4250f62a4ca0c4dc3ce730e08a3626e7a720da
parent0a9a7d262fcd9e796c3b99e66636c093ed46fd33 (diff)
Use 127.0.0.1 instead of localhost in test/httpserver, to force use of IPv4.
Perl on Windows tends to use IPv6 for localhost if possible, but the server binds to IPv4, breaking the test.
-rwxr-xr-xtest/httpserver/testfiles/testrequests.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/httpserver/testfiles/testrequests.pl b/test/httpserver/testfiles/testrequests.pl
index 85380ee0..4dd3549f 100755
--- a/test/httpserver/testfiles/testrequests.pl
+++ b/test/httpserver/testfiles/testrequests.pl
@@ -2,7 +2,9 @@
use strict;
use LWP::UserAgent;
-my $url_base = '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.
+my $url_base = 'http://127.0.0.1:1080';
my $ua = LWP::UserAgent->new(env_proxy => 0, keep_alive => 1, timeout => 30);