From 3cd333e7687c445b36a7974b8d71a1b13ee2d6f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
Date: Wed, 12 Oct 2016 14:58:08 +0200
Subject: Recognize URL schemata disregarding the case

---
 ...-are-case-tolerant-so-the-regexp-should-h.patch | 45 ++++++++++++++++++++++
 perl-CPAN.spec                                     |  4 ++
 2 files changed, 49 insertions(+)
 create mode 100644 
CPAN-2.14-URL-schemes-are-case-tolerant-so-the-regexp-should-h.patch

diff --git 
a/CPAN-2.14-URL-schemes-are-case-tolerant-so-the-regexp-should-h.patch 
b/CPAN-2.14-URL-schemes-are-case-tolerant-so-the-regexp-should-h.patch
new file mode 100644
index 0000000..c131720
--- /dev/null
+++ b/CPAN-2.14-URL-schemes-are-case-tolerant-so-the-regexp-should-h.patch
@@ -0,0 +1,45 @@
+From 5e0110a0e9a019b5acd107bf4b3593e95cf9cfb8 Mon Sep 17 00:00:00 2001
+From: Andreas Koenig <a...@cpan.org>
+Date: Sun, 10 Jul 2016 12:30:48 +0200
+Subject: [PATCH] URL schemes are case-tolerant, so the regexp should have /i
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+- thanks for the hint from Father C.
+
+Signed-off-by: Petr Písař <ppi...@redhat.com>
+---
+ lib/CPAN.pm     | 2 +-
+ lib/CPAN/FTP.pm | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/CPAN.pm b/lib/CPAN.pm
+index 6e460a8..fdb7869 100644
+--- a/lib/CPAN.pm
++++ b/lib/CPAN.pm
+@@ -1066,7 +1066,7 @@ sub has_usable {
+                'Net::FTP' => [
+                             sub {
+                                 my $var = $CPAN::Config->{ftp_proxy} || 
$ENV{ftp_proxy};
+-                                if ($var and $var =~ /^http:/) {
++                                if ($var and $var =~ /^http:/i) {
+                                     # rt #110833
+                                     for ("Net::FTP cannot handle http proxy") 
{
+                                         $CPAN::Frontend->mywarn($_);
+diff --git a/lib/CPAN/FTP.pm b/lib/CPAN/FTP.pm
+index 0c338c5..03a51fb 100644
+--- a/lib/CPAN/FTP.pm
++++ b/lib/CPAN/FTP.pm
+@@ -665,7 +665,7 @@ sub hostdleasy { #called from hostdlxxx
+                 # Net::FTP can still succeed where LWP fails. So we do not
+                 # skip Net::FTP anymore when LWP is available.
+             }
+-        } elsif ($url =~ /^http:/ && $CPAN::META->has_usable('HTTP::Tiny')) {
++        } elsif ($url =~ /^http:/i && $CPAN::META->has_usable('HTTP::Tiny')) {
+             require CPAN::HTTP::Client;
+             my $chc = CPAN::HTTP::Client->new(
+                 proxy => $CPAN::Config->{http_proxy} || $ENV{http_proxy},
+-- 
+2.7.4
+
diff --git a/perl-CPAN.spec b/perl-CPAN.spec
index 8fcfe00..b37666b 100644
--- a/perl-CPAN.spec
+++ b/perl-CPAN.spec
@@ -17,6 +17,8 @@ Patch3:         CPAN-2.14-Emergency-fix-for-cpan-o.patch
 # Do not use Net::FTP if ftp_proxy variable points to an HTTP server,
 # CPAN RT#110833, fixed after 2.14
 Patch4:         
CPAN-2.14-Prevent-trying-Net-FTP-when-an-ftp_proxy-variable-is.patch
+# Recognize URL schemata disregarding the case, fixed after 2.14
+Patch5:         
CPAN-2.14-URL-schemes-are-case-tolerant-so-the-regexp-should-h.patch
 BuildArch:      noarch
 BuildRequires:  coreutils
 BuildRequires:  findutils
@@ -197,6 +199,7 @@ external download clients to fetch distributions from the 
net.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 # Change configuration name
 find -type f -exec sed -i -e 's/XCPANCONFIGNAMEX/cpan/g' {} \;
 # Remove bundled modules
@@ -229,6 +232,7 @@ make test
 - Fix "cpan -O" invocation (CPAN RT#115786)
 - Do not use Net::FTP if ftp_proxy variable points to an HTTP server
   (CPAN RT#110833)
+- Recognize URL schemata disregarding the case
 
 * Wed May 18 2016 Jitka Plesnikova <jples...@redhat.com> - 2.11-366
 - Perl 5.24 re-rebuild of bootstrapped packages
-- 
cgit v0.12


        
http://pkgs.fedoraproject.org/cgit/perl-CPAN.git/commit/?h=master&id=3cd333e7687c445b36a7974b8d71a1b13ee2d6f9
_______________________________________________
perl-devel mailing list -- perl-devel@lists.fedoraproject.org
To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org

Reply via email to