708b56
From 572538753601755b4b6acace1d445bc8e1cc10c8 Mon Sep 17 00:00:00 2001
708b56
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
708b56
Date: Thu, 16 Feb 2017 14:00:57 +0100
708b56
Subject: [PATCH] Accept proxy URLs with IPv6 host names
708b56
MIME-Version: 1.0
708b56
Content-Type: text/plain; charset=UTF-8
708b56
Content-Transfer-Encoding: 8bit
708b56
708b56
<https://rt.cpan.org/Public/Bug/Display.html?id=94654>
708b56
708b56
Signed-off-by: Petr Písař <ppisar@redhat.com>
708b56
---
708b56
 lib/LWP/UserAgent.pm | 2 +-
708b56
 1 file changed, 1 insertion(+), 1 deletion(-)
708b56
708b56
diff --git a/lib/LWP/UserAgent.pm b/lib/LWP/UserAgent.pm
708b56
index ea03157..8549808 100644
708b56
--- a/lib/LWP/UserAgent.pm
708b56
+++ b/lib/LWP/UserAgent.pm
708b56
@@ -1039,7 +1039,7 @@ sub proxy
708b56
         my $url = shift;
708b56
         if (defined($url) && length($url)) {
708b56
             Carp::croak("Proxy must be specified as absolute URI; '$url' is not") unless $url =~ /^$URI::scheme_re:/;
708b56
-            Carp::croak("Bad http proxy specification '$url'") if $url =~ /^https?:/ && $url !~ m,^https?://\w,;
708b56
+            Carp::croak("Bad http proxy specification '$url'") if $url =~ /^https?:/ && $url !~ m,^https?://(?:\w|\[),;
708b56
         }
708b56
         $self->{proxy}{$key} = $url;
708b56
         $self->set_my_handler("request_preprepare", \&_need_proxy)
708b56
-- 
708b56
2.7.4
708b56