46 lines
1.8 KiB
Diff
46 lines
1.8 KiB
Diff
|
From 5e0110a0e9a019b5acd107bf4b3593e95cf9cfb8 Mon Sep 17 00:00:00 2001
|
||
|
From: Andreas Koenig <andk@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ř <ppisar@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
|
||
|
|