Hello community,
here is the log from the commit of package perl-AnyEvent-HTTP for
openSUSE:Factory checked in at 2015-05-18 22:20:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-AnyEvent-HTTP (Old)
and /work/SRC/openSUSE:Factory/.perl-AnyEvent-HTTP.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-AnyEvent-HTTP"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-AnyEvent-HTTP/perl-AnyEvent-HTTP.changes
2014-07-26 09:42:13.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-AnyEvent-HTTP.new/perl-AnyEvent-HTTP.changes
2015-05-18 22:20:46.000000000 +0200
@@ -1,0 +2,6 @@
+Thu May 14 08:02:22 UTC 2015 - [email protected]
+
+- updated to 2.22
+ see /usr/share/doc/packages/perl-AnyEvent-HTTP/Changes
+
+-------------------------------------------------------------------
Old:
----
AnyEvent-HTTP-2.21.tar.gz
New:
----
AnyEvent-HTTP-2.22.tar.gz
cpanspec.yml
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-AnyEvent-HTTP.spec ++++++
--- /var/tmp/diff_new_pack.vhZ2mM/_old 2015-05-18 22:20:47.000000000 +0200
+++ /var/tmp/diff_new_pack.vhZ2mM/_new 2015-05-18 22:20:47.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-AnyEvent-HTTP
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX 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,14 +17,16 @@
Name: perl-AnyEvent-HTTP
-Version: 2.21
+Version: 2.22
Release: 0
+#Upstream: CHECK(GPL-1.0+ or Artistic-1.0)
%define cpan_name AnyEvent-HTTP
-Summary: Simple but non-blocking HTTP/HTTPS client
-License: GPL-1.0+ or Artistic-1.0
+Summary: Simple but Non-Blocking Http/Https Client
+License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/AnyEvent-HTTP/
-Source:
http://www.cpan.org/authors/id/M/ML/MLEHMANN/%{cpan_name}-%{version}.tar.gz
+Source0:
http://www.cpan.org/authors/id/M/ML/MLEHMANN/%{cpan_name}-%{version}.tar.gz
+Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
++++++ AnyEvent-HTTP-2.21.tar.gz -> AnyEvent-HTTP-2.22.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/AnyEvent-HTTP-2.21/Changes
new/AnyEvent-HTTP-2.22/Changes
--- old/AnyEvent-HTTP-2.21/Changes 2014-06-09 01:36:23.000000000 +0200
+++ new/AnyEvent-HTTP-2.22/Changes 2015-05-14 04:04:06.000000000 +0200
@@ -3,10 +3,24 @@
TODO: provide lwp_request function that takes an lwp http requets and returns
a http response.
TODO: set_proxy hook
TODO: use proxy hook
-TODO: ip6 literals in url
TODO: maybe read big chunks in smaller portions for chunked-encoding + on_body.
-TODL: on_upgrade, for 101 responses?
+TODO: on_upgrade, for 101 responses?
TODO: document session vs. sessionid correctly.
+TODO: support proxy username:password in both proxy switch and set_proxy
string ([email protected])
+TODO: remove "unexpectedly got a destructed handle"
+
+TODO: callback as body (Kostirya)
+TODO: infinite recursion(?) (Kostirya)
+
+2.22 Thu May 14 04:04:03 CEST 2015
+ - ipv6 literals were not correctly parsed (analyzed by Raphael
Geissert).
+ - delete the body when mutating request to GET request when
+ redirecting (reported by joe trader).
+ - send proxy-authorization header to proxy when using CONNECT
+ (reported by [email protected]).
+ - do not send Proxy-Authroization header when not using a proxy.
+ - when retrying a persistent request, switch persistency off.
+ - added t/02_ip_literals.t.
2.21 Mon Jun 9 01:35:54 CEST 2014
- correctly keep body when redirecting POSTs, instead of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/AnyEvent-HTTP-2.21/HTTP.pm
new/AnyEvent-HTTP-2.22/HTTP.pm
--- old/AnyEvent-HTTP-2.21/HTTP.pm 2014-06-09 01:35:52.000000000 +0200
+++ new/AnyEvent-HTTP-2.22/HTTP.pm 2015-05-14 04:04:22.000000000 +0200
@@ -48,7 +48,7 @@
use base Exporter::;
-our $VERSION = 2.21;
+our $VERSION = 2.22;
our @EXPORT = qw(http_get http_post http_head http_request);
@@ -197,6 +197,9 @@
If not specified, then the default proxy is used (see
C<AnyEvent::HTTP::set_proxy>).
+Currently, if your proxy requires authorization, you have to specify an
+appropriate "Proxy-Authorization" header in every request.
+
=item body => $string
The request body, usually empty. Will be sent as-is (future versions of
@@ -772,7 +775,7 @@
: $uscheme eq "https" ? 443
: return $cb->(undef, { @pseudo, Status => 599, Reason => "Only
http and https URL schemes supported" });
- $uauthority =~ /^(?: .*\@ )? ([^\@:]+) (?: : (\d+) )?$/x
+ $uauthority =~ /^(?: .*\@ )? ([^\@]+?) (?: : (\d+) )?$/x
or return $cb->(undef, { @pseudo, Status => 599, Reason => "Unparsable
URL" });
my $uhost = lc $1;
@@ -936,11 +939,14 @@
# also, the UA should ask the user for 301 and 307 and POST,
# industry standard seems to be to simply follow.
# we go with the industry standard. 308 is defined
- # by rfc7238
+ # by rfc7538
if ($status == 301 or $status == 302 or $status == 303) {
- # HTTP/1.1 is unclear on how to mutate the method
- $method = "GET" unless $method eq "HEAD";
$redirect = 1;
+ # HTTP/1.1 is unclear on how to mutate the method
+ unless ($method eq "HEAD") {
+ $method = "GET";
+ delete $arg{body};
+ }
} elsif ($status == 307 or $status == 308) {
$redirect = 1;
}
@@ -1119,10 +1125,10 @@
%state = ();
$state{recurse} =
http_request (
- $method => $url,
+ $method => $url,
%arg,
- recurse => $recurse - 1,
- keepalive => 0,
+ recurse => $recurse - 1,
+ persistent => 0,
sub {
%state = ();
&$cb
@@ -1178,8 +1184,12 @@
if ($proxy && $uscheme eq "https") {
# oh dear, we have to wrap it into a connect request
+ my $auth = exists $hdr{"proxy-authorization"}
+ ? "proxy-authorization: " . (delete $hdr{"proxy-authorization"}) .
"\015\012"
+ : "";
+
# maybe re-use $uauthority with patched port?
- $state{handle}->push_write ("CONNECT $uhost:$uport
HTTP/1.0\015\012\015\012");
+ $state{handle}->push_write ("CONNECT $uhost:$uport
HTTP/1.0\015\012$auth\015\012");
$state{handle}->push_read (line => $qr_nlnl, sub {
$_[1] =~ /^HTTP\/([0-9\.]+) \s+ ([0-9]{3}) (?: \s+ ([^\015\012]*)
)?/ix
or return _error %state, $cb, { @pseudo, Status => 599, Reason
=> "Invalid proxy connect response ($_[1])" };
@@ -1192,6 +1202,8 @@
}
});
} else {
+ delete $hdr{"proxy-authorization"} unless $proxy;
+
$handle_actual_request->();
}
};
@@ -1279,7 +1291,7 @@
function from time to time.
A cookie jar is initially an empty hash-reference that is managed by this
-module. It's format is subject to change, but currently it is like this:
+module. Its format is subject to change, but currently it is as follows:
The key C<version> has to contain C<1>, otherwise the hash gets
emptied. All other keys are hostnames or IP addresses pointing to
@@ -1334,7 +1346,7 @@
=item $AnyEvent::HTTP::MAX_PER_HOST
The maximum number of concurrent connections to the same host (identified
-by the hostname). If the limit is exceeded, then the additional requests
+by the hostname). If the limit is exceeded, then additional requests
are queued until previous connections are closed. Both persistent and
non-persistent connections are counted in this limit.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/AnyEvent-HTTP-2.21/MANIFEST
new/AnyEvent-HTTP-2.22/MANIFEST
--- old/AnyEvent-HTTP-2.21/MANIFEST 2014-06-09 01:36:26.000000000 +0200
+++ new/AnyEvent-HTTP-2.22/MANIFEST 2015-05-14 04:04:29.000000000 +0200
@@ -6,5 +6,6 @@
HTTP.pm
t/00_load.t
t/01_basic.t
+t/02_ip_literals.t
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/AnyEvent-HTTP-2.21/META.json
new/AnyEvent-HTTP-2.22/META.json
--- old/AnyEvent-HTTP-2.21/META.json 2014-06-09 01:36:26.000000000 +0200
+++ new/AnyEvent-HTTP-2.22/META.json 2015-05-14 04:04:29.000000000 +0200
@@ -4,7 +4,7 @@
"unknown"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter
version 2.140640",
+ "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter
version 2.142060",
"license" : [
"unknown"
],
@@ -41,5 +41,5 @@
}
},
"release_status" : "stable",
- "version" : 2.21
+ "version" : 2.22
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/AnyEvent-HTTP-2.21/META.yml
new/AnyEvent-HTTP-2.22/META.yml
--- old/AnyEvent-HTTP-2.21/META.yml 2014-06-09 01:36:26.000000000 +0200
+++ new/AnyEvent-HTTP-2.22/META.yml 2015-05-14 04:04:29.000000000 +0200
@@ -7,7 +7,7 @@
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version
2.140640'
+generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version
2.142060'
license: unknown
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -22,4 +22,4 @@
requires:
AnyEvent: '5.33'
common::sense: '3.3'
-version: 2.21
+version: 2.22
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/AnyEvent-HTTP-2.21/README
new/AnyEvent-HTTP-2.22/README
--- old/AnyEvent-HTTP-2.21/README 2014-06-09 01:36:26.000000000 +0200
+++ new/AnyEvent-HTTP-2.22/README 2015-05-14 04:04:29.000000000 +0200
@@ -149,6 +149,10 @@
If not specified, then the default proxy is used (see
"AnyEvent::HTTP::set_proxy").
+ Currently, if your proxy requires authorization, you have to
+ specify an appropriate "Proxy-Authorization" header in every
+ request.
+
body => $string
The request body, usually empty. Will be sent as-is (future
versions of this module might offer more options).
@@ -395,8 +399,8 @@
additionally call this function from time to time.
A cookie jar is initially an empty hash-reference that is managed by
- this module. It's format is subject to change, but currently it is
- like this:
+ this module. Its format is subject to change, but currently it is as
+ follows:
The key "version" has to contain 1, otherwise the hash gets emptied.
All other keys are hostnames or IP addresses pointing to
@@ -447,7 +451,7 @@
$AnyEvent::HTTP::MAX_PER_HOST
The maximum number of concurrent connections to the same host
- (identified by the hostname). If the limit is exceeded, then the
+ (identified by the hostname). If the limit is exceeded, then
additional requests are queued until previous connections are
closed. Both persistent and non-persistent connections are counted
in this limit.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/AnyEvent-HTTP-2.21/t/02_ip_literals.t
new/AnyEvent-HTTP-2.22/t/02_ip_literals.t
--- old/AnyEvent-HTTP-2.21/t/02_ip_literals.t 1970-01-01 01:00:00.000000000
+0100
+++ new/AnyEvent-HTTP-2.22/t/02_ip_literals.t 2015-05-08 23:09:55.000000000
+0200
@@ -0,0 +1,34 @@
+BEGIN { $| = 1; print "1..23\n" }
+
+use AnyEvent::Impl::Perl;
+
+require AnyEvent::HTTP;
+
+print "ok 1\n";
+
+my $t = 2;
+
+for my $auth (qw(
+ 0.42.42.42
+ [0.42.42.42]:81
+ [::0.42.42.42]:81
+ [::0:2]
+ [0:0::2]:80
+ [::0:2]:81
+ [0:0::2]:81
+)) {
+ my $cv = AE::cv;
+
+ AnyEvent::HTTP::http_get ("http://$auth/", timeout => 1/128, sub {
+ print $_[1]{Status} == 599 ? "not ": "", "ok ", $t + 1, " #
$_[1]{Status} $auth\n";
+ $cv->send;
+ });
+
+ print "ok ", $t, "\n";
+ $cv->recv;
+ print "ok ", $t + 2, "\n";
+
+ $t += 3;
+}
+
+print "ok 23\n";
++++++ cpanspec.yml ++++++
---
#description_paragraphs: 3
#no_testing: broken upstream
#sources:
# - source1
# - source2
#patches:
# foo.patch: -p1
# bar.patch:
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_install: |-
# sed on %{name}.files
license: Perl License
#skip_noarch: 1
#custom_build: |-
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module