Package: libfurl-perl / 3.13-2

1003_proxy_localhost.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Description: Adjust tests to IPv6-enabled HTTP::Proxy.
 The patch from https://rt.cpan.org/Public/Bug/Display.html?id=120275 adds
 IPv6 support to HTTP::Proxy (in Debian added as
 HTTP-Proxy-0.304-Support-IPv6.patch in libhttp-proxy-perl since 0.304-4).
 .
 As HTTP::Proxy listens by default on 'localhost', the three tests
 t/100_low/08_proxy.t, t/100_low/18_no_proxy.t, t/100_low/32_proxy_auth.t
 now fail, as they expect the proxy to run on 127.0.0.1 whereas localhost
 can be ::1 now.
 .
 Change the three tests to run the proxy server explicitly on 127.0.0.1.
Origin: vendor
Bug-Debian: https://bugs.debian.org/924859
Forwarded: https://github.com/tokuhirom/Furl/pull/116
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2019-03-21
Bug: https://github.com/tokuhirom/Furl/pull/116

--- a/t/100_low/08_proxy.t
+++ b/t/100_low/08_proxy.t
@@ -120,7 +120,7 @@
     },
     server => sub { # proxy server
         my $proxy_port = shift;
-        my $proxy = Test::HTTP::Proxy->new(port => $proxy_port, via => $via);
+        my $proxy = Test::HTTP::Proxy->new(host => '127.0.0.1', port => $proxy_port, via => $via);
         $proxy->agent(test_agent);
         $proxy->start();
     },
@@ -140,7 +140,7 @@
     },
     server => sub { # proxy server
         my $proxy_port = shift;
-        my $proxy = Test::HTTP::Proxy->new(port => $proxy_port, via => $via);
+        my $proxy = Test::HTTP::Proxy->new(host => '127.0.0.1', port => $proxy_port, via => $via);
         $proxy->agent(test_agent);
         $proxy->agent->real_httpd_port($httpd->port);
         $proxy->start();
@@ -183,7 +183,7 @@
     },
     server => sub { # proxy server
         my $proxy_port = shift;
-        my $proxy = Test::HTTP::Proxy->new(port => $proxy_port, via => $via);
+        my $proxy = Test::HTTP::Proxy->new(host => '127.0.0.1', port => $proxy_port, via => $via);
         $proxy->start();
     },
 );
--- a/t/100_low/18_no_proxy.t
+++ b/t/100_low/18_no_proxy.t
@@ -70,7 +70,7 @@
     },
     server => sub { # proxy server
         my $proxy_port = shift;
-        my $proxy = Test::HTTP::Proxy->new(port => $proxy_port, via => $via);
+        my $proxy = Test::HTTP::Proxy->new(host => '127.0.0.1', port => $proxy_port, via => $via);
         $proxy->start();
     },
 );
--- a/t/100_low/32_proxy_auth.t
+++ b/t/100_low/32_proxy_auth.t
@@ -79,7 +79,7 @@
     },
     server => sub { # proxy server
         my $proxy_port = shift;
-        my $proxy = Test::HTTP::Proxy->new(port => $proxy_port, via => $via);
+        my $proxy = Test::HTTP::Proxy->new(host => '127.0.0.1', port => $proxy_port, via => $via);
         my $token_simple = "Basic " . encode_base64( "dankogai:kogaidan", "" );
         my $token_escape = "Basic " . encode_base64( 'dan@kogai:kogai/dan', "" );
         $proxy->push_filter(