Hello community, here is the log from the commit of package perl-Net-HTTP for openSUSE:Factory checked in at 2014-09-17 17:24:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Net-HTTP (Old) and /work/SRC/openSUSE:Factory/.perl-Net-HTTP.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "perl-Net-HTTP" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Net-HTTP/perl-Net-HTTP.changes 2013-06-14 16:47:02.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Net-HTTP.new/perl-Net-HTTP.changes 2014-09-17 17:24:18.000000000 +0200 @@ -1,0 +2,8 @@ +Mon Sep 15 12:52:31 UTC 2014 - coolo@suse.com + +- updated to 6.07 + Jason Fesler (1): + Opportunistically use IO::Socket::IP or IO::Socket::INET6. + Properly parse IPv6 literal addreses with optional port numbers. [RT#75618] + +------------------------------------------------------------------- Old: ---- Net-HTTP-6.06.tar.gz New: ---- Net-HTTP-6.07.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Net-HTTP.spec ++++++ --- /var/tmp/diff_new_pack.ySikA9/_old 2014-09-17 17:24:19.000000000 +0200 +++ /var/tmp/diff_new_pack.ySikA9/_new 2014-09-17 17:24:19.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-Net-HTTP # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,29 +17,24 @@ Name: perl-Net-HTTP -Version: 6.06 +Version: 6.07 Release: 0 %define cpan_name Net-HTTP Summary: Low-level HTTP connection (client) License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Net-HTTP/ -Source: http://www.cpan.org/authors/id/G/GA/GAAS/%{cpan_name}-%{version}.tar.gz +Source: http://www.cpan.org/authors/id/M/MS/MSCHILLI/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Compress::Raw::Zlib) BuildRequires: perl(IO::Compress::Gzip) -#BuildRequires: perl(IO::Socket::SSL) -#BuildRequires: perl(IO::Uncompress::Gunzip) -#BuildRequires: perl(Net::HTTP) -#BuildRequires: perl(Net::HTTP::Methods) -#BuildRequires: perl(Net::HTTP::NB) -#BuildRequires: perl(Net::HTTPS) -#BuildRequires: perl(Net::SSL) +BuildRequires: perl(URI) Requires: perl(Compress::Raw::Zlib) Requires: perl(IO::Compress::Gzip) +Requires: perl(URI) Recommends: perl(IO::Socket::SSL) >= 1.38 %{perl_requires} @@ -49,9 +44,11 @@ protocol is described in RFC 2616. The 'Net::HTTP' class supports 'HTTP/1.0' and 'HTTP/1.1'. -'Net::HTTP' is a sub-class of 'IO::Socket::INET'. You can mix the methods -described below with reading and writing from the socket directly. This is -not necessary a good idea, unless you know what you are doing. +'Net::HTTP' is a sub-class of one of 'IO::Socket::IP' (IPv6+IPv4), +'IO::Socket::INET6' (IPv6+IPv4), or 'IO::Socket::INET' (IPv4 only). You can +mix the methods described below with reading and writing from the socket +directly. This is not necessary a good idea, unless you know what you are +doing. %prep %setup -q -n %{cpan_name}-%{version} ++++++ Net-HTTP-6.06.tar.gz -> Net-HTTP-6.07.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.06/Changes new/Net-HTTP-6.07/Changes --- old/Net-HTTP-6.06/Changes 2013-03-10 23:37:09.000000000 +0100 +++ new/Net-HTTP-6.07/Changes 2014-07-24 05:25:51.000000000 +0200 @@ -1,3 +1,9 @@ +2014-07-23 Net-HTTP 6.07 + +Jason Fesler (1): + Opportunistically use IO::Socket::IP or IO::Socket::INET6. + Properly parse IPv6 literal addreses with optional port numbers. [RT#75618] + _______________________________________________________________________________ 2013-03-10 Net-HTTP 6.06 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.06/MANIFEST new/Net-HTTP-6.07/MANIFEST --- old/Net-HTTP-6.06/MANIFEST 2013-03-10 23:38:46.000000000 +0100 +++ new/Net-HTTP-6.07/MANIFEST 2014-07-24 05:31:19.000000000 +0200 @@ -10,4 +10,5 @@ t/http-nb.t t/apache.t t/apache-https.t -META.yml Module meta-data (added by MakeMaker) +META.yml Module YAML meta-data (added by MakeMaker) +META.json Module JSON meta-data (added by MakeMaker) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.06/META.json new/Net-HTTP-6.07/META.json --- old/Net-HTTP-6.06/META.json 1970-01-01 01:00:00.000000000 +0100 +++ new/Net-HTTP-6.07/META.json 2014-07-24 05:31:19.000000000 +0200 @@ -0,0 +1,55 @@ +{ + "abstract" : "Low-level HTTP connection (client)", + "author" : [ + "Gisle Aas <gisle@activestate.com>" + ], + "dynamic_config" : 1, + "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.141170", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "Net-HTTP", + "no_index" : { + "directory" : [ + "t", + "inc" + ] + }, + "prereqs" : { + "build" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, + "configure" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, + "runtime" : { + "recommends" : { + "IO::Socket::SSL" : "1.38" + }, + "requires" : { + "Compress::Raw::Zlib" : "0", + "IO::Compress::Gzip" : "0", + "IO::Select" : "0", + "IO::Socket::INET" : "0", + "URI" : "0", + "perl" : "5.006002" + } + } + }, + "release_status" : "stable", + "resources" : { + "repository" : { + "url" : "http://github.com/libwww-perl/net-http" + }, + "x_MailingList" : "mailto:libwww@perl.org" + }, + "version" : "6.07" +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.06/META.yml new/Net-HTTP-6.07/META.yml --- old/Net-HTTP-6.06/META.yml 2013-03-10 23:38:46.000000000 +0100 +++ new/Net-HTTP-6.07/META.yml 2014-07-24 05:31:19.000000000 +0200 @@ -1,31 +1,32 @@ ---- #YAML:1.0 -name: Net-HTTP -version: 6.06 -abstract: Low-level HTTP connection (client) +--- +abstract: 'Low-level HTTP connection (client)' author: - - Gisle Aas <gisle@activestate.com> -license: perl -distribution_type: module -configure_requires: - ExtUtils::MakeMaker: 0 + - 'Gisle Aas <gisle@activestate.com>' build_requires: - ExtUtils::MakeMaker: 0 -requires: - Compress::Raw::Zlib: 0 - IO::Compress::Gzip: 0 - IO::Select: 0 - IO::Socket::INET: 0 - perl: 5.006002 -resources: - MailingList: mailto:libwww@perl.org - repository: http://github.com/gisle/net-http -no_index: - directory: - - t - - inc -generated_by: ExtUtils::MakeMaker version 6.57_05 + ExtUtils::MakeMaker: '0' +configure_requires: + ExtUtils::MakeMaker: '0' +dynamic_config: 1 +generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.141170' +license: perl meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: '1.4' +name: Net-HTTP +no_index: + directory: + - t + - inc recommends: - IO::Socket::SSL: 1.38 + IO::Socket::SSL: '1.38' +requires: + Compress::Raw::Zlib: '0' + IO::Compress::Gzip: '0' + IO::Select: '0' + IO::Socket::INET: '0' + URI: '0' + perl: '5.006002' +resources: + MailingList: mailto:libwww@perl.org + repository: http://github.com/libwww-perl/net-http +version: '6.07' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.06/Makefile.PL new/Net-HTTP-6.07/Makefile.PL --- old/Net-HTTP-6.06/Makefile.PL 2012-02-15 23:22:14.000000000 +0100 +++ new/Net-HTTP-6.07/Makefile.PL 2014-07-24 05:21:30.000000000 +0200 @@ -26,13 +26,14 @@ 'IO::Select' => 0, 'Compress::Raw::Zlib' => 0, 'IO::Compress::Gzip' => 0, + 'URI' => 0, }, META_MERGE => { recommends => { 'IO::Socket::SSL' => "1.38", }, resources => { - repository => 'http://github.com/gisle/net-http', + repository => 'http://github.com/libwww-perl/net-http', MailingList => 'mailto:libwww@perl.org', } }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.06/lib/Net/HTTP/Methods.pm new/Net-HTTP-6.07/lib/Net/HTTP/Methods.pm --- old/Net-HTTP-6.06/lib/Net/HTTP/Methods.pm 2013-03-10 23:35:43.000000000 +0100 +++ new/Net-HTTP-6.07/lib/Net/HTTP/Methods.pm 2014-07-24 05:27:26.000000000 +0200 @@ -4,8 +4,9 @@ use strict; use vars qw($VERSION); +use URI; -$VERSION = "6.06"; +$VERSION = "6.07"; my $CRLF = "\015\012"; # "\r\n" is not portable @@ -44,20 +45,30 @@ $cnf->{PeerAddr} = $peer = $host; } - if ($peer =~ s,:(\d+)$,,) { - $cnf->{PeerPort} = int($1); # always override - } - if (!$cnf->{PeerPort}) { - $cnf->{PeerPort} = $self->http_default_port; - } - - if (!$explict_host) { - $host = $peer; - $host =~ s/:.*//; - } - if ($host && $host !~ /:/) { - my $p = $cnf->{PeerPort}; - $host .= ":$p" if $p != $self->http_default_port; + # CONNECTIONS + # PREFER: port number from PeerAddr, then PeerPort, then http_default_port + my $peer_uri = URI->new("http://$peer"); + $cnf->{"PeerPort"} = $peer_uri->_port || $cnf->{PeerPort} || $self->http_default_port; + $cnf->{"PeerAddr"} = $peer_uri->host; + + # HOST header: + # If specified but blank, ignore. + # If specified with a value, add the port number + # If not specified, set to PeerAddr and port number + # ALWAYS: If IPv6 address, use [brackets] (thanks to the URI package) + # ALWAYS: omit port number if http_default_port + if (($host) || (! $explict_host)) { + my $uri = ($explict_host) ? URI->new("http://$host") : $peer_uri->clone; + if (!$uri->_port) { + # Always use *our* $self->http_default_port instead of URI's (Covers HTTP, HTTPS) + $uri->port( $cnf->{PeerPort} || $self->http_default_port); + } + my $host_port = $uri->host_port; # Returns host:port or [ipv6]:port + my $remove = ":" . $self->http_default_port; # we want to remove the default port number + if (substr($host_port,0-length($remove)) eq $remove) { + substr($host_port,0-length($remove)) = ""; + } + $host = $host_port; } $cnf->{Proto} = 'tcp'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.06/lib/Net/HTTP.pm new/Net-HTTP-6.07/lib/Net/HTTP.pm --- old/Net-HTTP-6.06/lib/Net/HTTP.pm 2013-03-10 23:35:20.000000000 +0100 +++ new/Net-HTTP-6.07/lib/Net/HTTP.pm 2014-07-24 05:26:04.000000000 +0200 @@ -3,10 +3,19 @@ use strict; use vars qw($VERSION @ISA $SOCKET_CLASS); -$VERSION = "6.06"; +$VERSION = "6.07"; unless ($SOCKET_CLASS) { - eval { require IO::Socket::INET } || require IO::Socket; - $SOCKET_CLASS = "IO::Socket::INET"; + # Try several, in order of capability and preference + if (eval { require IO::Socket::IP }) { + $SOCKET_CLASS = "IO::Socket::IP"; # IPv4+IPv6 + } elsif (eval { require IO::Socket::INET6 }) { + $SOCKET_CLASS = "IO::Socket::INET6"; # IPv4+IPv6 + } elsif (eval { require IO::Socket::INET }) { + $SOCKET_CLASS = "IO::Socket::INET"; # IPv4 only + } else { + require IO::Socket; + $SOCKET_CLASS = "IO::Socket::INET"; + } } require Net::HTTP::Methods; require Carp; @@ -59,10 +68,11 @@ HTTP protocol is described in RFC 2616. The C<Net::HTTP> class supports C<HTTP/1.0> and C<HTTP/1.1>. -C<Net::HTTP> is a sub-class of C<IO::Socket::INET>. You can mix the -methods described below with reading and writing from the socket -directly. This is not necessary a good idea, unless you know what you -are doing. +C<Net::HTTP> is a sub-class of one of C<IO::Socket::IP> (IPv6+IPv4), +C<IO::Socket::INET6> (IPv6+IPv4), or C<IO::Socket::INET> (IPv4 only). +You can mix the methods described below with reading and writing from the +socket directly. This is not necessary a good idea, unless you know what +you are doing. The following methods are provided (in addition to those of C<IO::Socket::INET>): @@ -84,6 +94,9 @@ The C<Host> option is also the default for C<IO::Socket::INET>'s C<PeerAddr>. The C<PeerPort> defaults to 80 if not provided. +The C<PeerPort> specification can also be embedded in the C<PeerAddr> +by preceding it with a ":", and closing the IPv6 address on bracktes "[]" if +necessary: "192.0.2.1:80","[2001:db8::1]:80","any.example.com:80". The C<Listen> option provided by C<IO::Socket::INET>'s constructor method is not allowed. -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org