From 0748904343bfb047b4716c894a9befe4b24f56db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]> Date: Tue, 13 Sep 2016 13:03:35 +0200 Subject: Respect proxy setting for HTTPS, FTP, and FTP
--- ...-0.07b4p1-Respect-proxy-setting-for-HTTPS.patch | 36 ++++++++++++++++++++++ perl-Frontier-RPC.spec | 8 ++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 Frontier-RPC-0.07b4p1-Respect-proxy-setting-for-HTTPS.patch diff --git a/Frontier-RPC-0.07b4p1-Respect-proxy-setting-for-HTTPS.patch b/Frontier-RPC-0.07b4p1-Respect-proxy-setting-for-HTTPS.patch new file mode 100644 index 0000000..e9ddb51 --- /dev/null +++ b/Frontier-RPC-0.07b4p1-Respect-proxy-setting-for-HTTPS.patch @@ -0,0 +1,36 @@ +From c5ffabf72c254ba3c185b0234ca77e0525eed57f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]> +Date: Tue, 13 Sep 2016 13:00:14 +0200 +Subject: [PATCH] Respect proxy setting for HTTPS +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +URLs different from http schema ignored specified proxy. This patch +passes the proxy setting for http and https schemata. + +Signed-off-by: Petr Písař <[email protected]> +--- + lib/Frontier/Client.pm | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/lib/Frontier/Client.pm b/lib/Frontier/Client.pm +index 6ea7b60..a7bdce2 100644 +--- a/lib/Frontier/Client.pm ++++ b/lib/Frontier/Client.pm +@@ -28,8 +28,10 @@ sub new { + if !defined $self->{'url'}; + + $self->{'ua'} = LWP::UserAgent->new; +- $self->{'ua'}->proxy('http', $self->{'proxy'}) +- if(defined $self->{'proxy'}); ++ my @schemes = grep { $self->{'ua'}->is_protocol_supported($_) } ++ qw/http https/; ++ $self->{'ua'}->proxy([@schemes], $self->{'proxy'}) ++ if(defined $self->{'proxy'} && @schemes); + $self->{'rq'} = HTTP::Request->new (POST => $self->{'url'}); + $self->{'rq'}->header('Content-Type' => 'text/xml'); + # Patch to enable basic authentication: +-- +2.7.4 + diff --git a/perl-Frontier-RPC.spec b/perl-Frontier-RPC.spec index d75a5c6..cf9dc1d 100644 --- a/perl-Frontier-RPC.spec +++ b/perl-Frontier-RPC.spec @@ -1,7 +1,7 @@ Summary: A Perl interface for making and serving XML-RPC calls Name: perl-Frontier-RPC Version: 0.07b4p1 -Release: 26%{?dist} +Release: 27%{?dist} License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Frontier-RPC/ @@ -11,6 +11,8 @@ Patch1: perl-frontier-raw-serve.patch Patch2: perl-frontier-undef-scalar.patch Patch3: security-xml-external-entity.patch Patch4: apache2.patch +# Respect proxy setting for HTTPS, FTP, and FTP, bug #832390, CPAN RT#117812 +Patch5: Frontier-RPC-0.07b4p1-Respect-proxy-setting-for-HTTPS.patch BuildArch: noarch BuildRequires: perl BuildRequires: perl-generators @@ -63,6 +65,7 @@ Documentation and examples to Frontier::RPC and Frontier::RPC::Client. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build perl Makefile.PL INSTALLDIRS=vendor @@ -88,6 +91,9 @@ make test %{_mandir}/man3/* %changelog +* Tue Sep 13 2016 Petr Pisar <[email protected]> - 0.07b4p1-27 +- Respect proxy setting for HTTPS, FTP, and FTP (bug #832390) + * Mon May 16 2016 Jitka Plesnikova <[email protected]> - 0.07b4p1-26 - Perl 5.24 rebuild -- cgit v0.12 http://pkgs.fedoraproject.org/cgit/perl-Frontier-RPC.git/commit/?h=master&id=0748904343bfb047b4716c894a9befe4b24f56db -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list [email protected] https://lists.fedoraproject.org/admin/lists/[email protected]
