From bf29bae55670e7db407ac34d15ff803a99f7373d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 16 Feb 2017 14:07:48 +0100 Subject: [PATCH] Accept proxy URLs with IPv6 host names --- ...cept-proxy-URLs-with-IPv6-host-names.patch | 31 +++++++++++++++++++ perl-libwww-perl.spec | 8 ++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 libwww-perl-6.19-Accept-proxy-URLs-with-IPv6-host-names.patch diff --git a/libwww-perl-6.19-Accept-proxy-URLs-with-IPv6-host-names.patch b/libwww-perl-6.19-Accept-proxy-URLs-with-IPv6-host-names.patch new file mode 100644 index 0000000..409e266 --- /dev/null +++ b/libwww-perl-6.19-Accept-proxy-URLs-with-IPv6-host-names.patch @@ -0,0 +1,31 @@ +From 572538753601755b4b6acace1d445bc8e1cc10c8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 16 Feb 2017 14:00:57 +0100 +Subject: [PATCH] Accept proxy URLs with IPv6 host names +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + + +Signed-off-by: Petr Písař +--- + lib/LWP/UserAgent.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/LWP/UserAgent.pm b/lib/LWP/UserAgent.pm +index ea03157..8549808 100644 +--- a/lib/LWP/UserAgent.pm ++++ b/lib/LWP/UserAgent.pm +@@ -1039,7 +1039,7 @@ sub proxy + my $url = shift; + if (defined($url) && length($url)) { + Carp::croak("Proxy must be specified as absolute URI; '$url' is not") unless $url =~ /^$URI::scheme_re:/; +- Carp::croak("Bad http proxy specification '$url'") if $url =~ /^https?:/ && $url !~ m,^https?://\w,; ++ Carp::croak("Bad http proxy specification '$url'") if $url =~ /^https?:/ && $url !~ m,^https?://(?:\w|\[),; + } + $self->{proxy}{$key} = $url; + $self->set_my_handler("request_preprepare", \&_need_proxy) +-- +2.7.4 + diff --git a/perl-libwww-perl.spec b/perl-libwww-perl.spec index 893dd5e..e75ea4b 100644 --- a/perl-libwww-perl.spec +++ b/perl-libwww-perl.spec @@ -1,11 +1,13 @@ Name: perl-libwww-perl Version: 6.19 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A Perl interface to the World-Wide Web Group: Development/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/dist/libwww-perl/ Source0: http://www.cpan.org/authors/id/O/OA/OALDERS/libwww-perl-%{version}.tar.gz +# Accept proxy URLs with IPv6 host names, CPAN RT#94654 +Patch0: libwww-perl-6.19-Accept-proxy-URLs-with-IPv6-host-names.patch BuildArch: noarch BuildRequires: coreutils BuildRequires: findutils @@ -112,6 +114,7 @@ use and even classes that help you implement simple HTTP servers. %prep %setup -q -n libwww-perl-%{version} +%patch0 -p1 %build # Install the aliases by default @@ -138,6 +141,9 @@ make test %{_mandir}/man3/*.3* %changelog +* Thu Feb 16 2017 Petr Pisar - 6.19-2 +- Accept proxy URLs with IPv6 host names (CPAN RT#94654) + * Wed Feb 15 2017 Petr Pisar - 6.19-1 - 6.19 bump