Hello community,
here is the log from the commit of package perl-libwww-perl for
openSUSE:Factory checked in at 2019-11-25 11:21:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-libwww-perl (Old)
and /work/SRC/openSUSE:Factory/.perl-libwww-perl.new.26869 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-libwww-perl"
Mon Nov 25 11:21:47 2019 rev:63 rq:750066 version:6.42
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-libwww-perl/perl-libwww-perl.changes
2019-11-04 17:02:03.239981850 +0100
+++
/work/SRC/openSUSE:Factory/.perl-libwww-perl.new.26869/perl-libwww-perl.changes
2019-11-25 11:21:55.394131284 +0100
@@ -1,0 +2,14 @@
+Thu Nov 21 10:04:38 UTC 2019 - <[email protected]>
+
+- updated to 6.42
+ see /usr/share/doc/packages/perl-libwww-perl/Changes
+
+ 6.42 2019-11-20 17:40:52Z
+ - Add retry handling for a stale nonce with digest authentication
(marmotil
+ and Frank Maas) (GH#40, GH#313, GH#321)
+ - Add the patch method to LWP::UserAgent. (GH#334) (Chase Whitener)
+ - Fix docs to match keep_alive => undef behavior, add some trivial tests
+ (GH#333) (Ville Skyttä)
+ - Documentation grammar fixes (GH#331) (Ville Skyttä)
+
+-------------------------------------------------------------------
Old:
----
libwww-perl-6.41.tar.gz
New:
----
libwww-perl-6.42.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-libwww-perl.spec ++++++
--- /var/tmp/diff_new_pack.dJ0YZW/_old 2019-11-25 11:21:57.458130914 +0100
+++ /var/tmp/diff_new_pack.dJ0YZW/_new 2019-11-25 11:21:57.462130914 +0100
@@ -17,7 +17,7 @@
Name: perl-libwww-perl
-Version: 6.41
+Version: 6.42
Release: 0
%define cpan_name libwww-perl
Summary: The World-Wide Web library for Perl
++++++ libwww-perl-6.41.tar.gz -> libwww-perl-6.42.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/Changes new/libwww-perl-6.42/Changes
--- old/libwww-perl-6.41/Changes 2019-10-28 15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/Changes 2019-11-20 18:40:55.000000000 +0100
@@ -1,5 +1,13 @@
Change history for libwww-perl
+6.42 2019-11-20 17:40:52Z
+ - Add retry handling for a stale nonce with digest authentication (marmotil
+ and Frank Maas) (GH#40, GH#313, GH#321)
+ - Add the patch method to LWP::UserAgent. (GH#334) (Chase Whitener)
+ - Fix docs to match keep_alive => undef behavior, add some trivial tests
+ (GH#333) (Ville Skyttä)
+ - Documentation grammar fixes (GH#331) (Ville Skyttä)
+
6.41 2019-10-28 14:42:06Z
- Allow mirroring to files called '0' (GH#329) (Mark Fowler)
@@ -795,7 +803,7 @@
- HTML::Form:
- Handle clicking on nameless image.
- Don't let $form->click invoke a disabled submit button.
- - HTTP::Cookies could not handle a "old-style" cookie named "Expires".
+ - HTTP::Cookies could not handle an "old-style" cookie named "Expires".
- HTTP::Headers work-around for thread safety issue in perl <= 5.8.4.
- HTTP::Request::Common improved documentation.
- LWP::Protocol: Check that we can write to the file specified in
@@ -1412,7 +1420,7 @@
- We require URI-1.03, since this fix some query quoting stuff that
HTTP::Request::Common rely upon.
- 'lwp-request -HUser-Agent:foo' can now be used to set this header too.
- - Localize $/ to ensure standard record separator a in HTTP::Cookies
+ - Localize $/ to ensure standard record separator in HTTP::Cookies
- LWP::UserAgent will now set the Range header in requests if the
$ua->max_size attribute is set.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/META.json
new/libwww-perl-6.42/META.json
--- old/libwww-perl-6.41/META.json 2019-10-28 15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/META.json 2019-11-20 18:40:55.000000000 +0100
@@ -109,96 +109,96 @@
"provides" : {
"LWP" : {
"file" : "lib/LWP.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Authen::Basic" : {
"file" : "lib/LWP/Authen/Basic.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Authen::Digest" : {
"file" : "lib/LWP/Authen/Digest.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Authen::Ntlm" : {
"file" : "lib/LWP/Authen/Ntlm.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::ConnCache" : {
"file" : "lib/LWP/ConnCache.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Debug" : {
"file" : "lib/LWP/Debug.pm",
- "version" : "6.41",
+ "version" : "6.42",
"x_deprecated" : 1
},
"LWP::Debug::TraceHTTP" : {
"file" : "lib/LWP/Debug/TraceHTTP.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::DebugFile" : {
"file" : "lib/LWP/DebugFile.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::MemberMixin" : {
"file" : "lib/LWP/MemberMixin.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Protocol" : {
"file" : "lib/LWP/Protocol.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Protocol::cpan" : {
"file" : "lib/LWP/Protocol/cpan.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Protocol::data" : {
"file" : "lib/LWP/Protocol/data.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Protocol::file" : {
"file" : "lib/LWP/Protocol/file.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Protocol::ftp" : {
"file" : "lib/LWP/Protocol/ftp.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Protocol::gopher" : {
"file" : "lib/LWP/Protocol/gopher.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Protocol::http" : {
"file" : "lib/LWP/Protocol/http.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Protocol::loopback" : {
"file" : "lib/LWP/Protocol/loopback.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Protocol::mailto" : {
"file" : "lib/LWP/Protocol/mailto.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Protocol::nntp" : {
"file" : "lib/LWP/Protocol/nntp.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Protocol::nogo" : {
"file" : "lib/LWP/Protocol/nogo.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::RobotUA" : {
"file" : "lib/LWP/RobotUA.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::Simple" : {
"file" : "lib/LWP/Simple.pm",
- "version" : "6.41"
+ "version" : "6.42"
},
"LWP::UserAgent" : {
"file" : "lib/LWP/UserAgent.pm",
- "version" : "6.41"
+ "version" : "6.42"
}
},
"release_status" : "stable",
@@ -215,7 +215,7 @@
"x_IRC" : "irc://irc.perl.org/#lwp",
"x_MailingList" : "mailto:[email protected]"
},
- "version" : "6.41",
+ "version" : "6.42",
"x_Dist_Zilla" : {
"perl" : {
"version" : "5.030000"
@@ -780,7 +780,7 @@
"branch" : null,
"changelog" : "Changes",
"signed" : 0,
- "tag" : "v6.41",
+ "tag" : "v6.42",
"tag_format" : "v%V",
"tag_message" : "v%V"
},
@@ -958,6 +958,7 @@
"Doug Bell <[email protected]>",
"Fabian Zeindler <[email protected]>",
"Father Chrysostomos <[email protected]>",
+ "Frank Maas <[email protected]>",
"FWILES <[email protected]>",
"Gavin Peters <[email protected]>",
"Gerhard Poul <[email protected]>",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/META.yml
new/libwww-perl-6.42/META.yml
--- old/libwww-perl-6.41/META.yml 2019-10-28 15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/META.yml 2019-11-20 18:40:55.000000000 +0100
@@ -30,74 +30,74 @@
provides:
LWP:
file: lib/LWP.pm
- version: '6.41'
+ version: '6.42'
LWP::Authen::Basic:
file: lib/LWP/Authen/Basic.pm
- version: '6.41'
+ version: '6.42'
LWP::Authen::Digest:
file: lib/LWP/Authen/Digest.pm
- version: '6.41'
+ version: '6.42'
LWP::Authen::Ntlm:
file: lib/LWP/Authen/Ntlm.pm
- version: '6.41'
+ version: '6.42'
LWP::ConnCache:
file: lib/LWP/ConnCache.pm
- version: '6.41'
+ version: '6.42'
LWP::Debug:
file: lib/LWP/Debug.pm
- version: '6.41'
+ version: '6.42'
x_deprecated: 1
LWP::Debug::TraceHTTP:
file: lib/LWP/Debug/TraceHTTP.pm
- version: '6.41'
+ version: '6.42'
LWP::DebugFile:
file: lib/LWP/DebugFile.pm
- version: '6.41'
+ version: '6.42'
LWP::MemberMixin:
file: lib/LWP/MemberMixin.pm
- version: '6.41'
+ version: '6.42'
LWP::Protocol:
file: lib/LWP/Protocol.pm
- version: '6.41'
+ version: '6.42'
LWP::Protocol::cpan:
file: lib/LWP/Protocol/cpan.pm
- version: '6.41'
+ version: '6.42'
LWP::Protocol::data:
file: lib/LWP/Protocol/data.pm
- version: '6.41'
+ version: '6.42'
LWP::Protocol::file:
file: lib/LWP/Protocol/file.pm
- version: '6.41'
+ version: '6.42'
LWP::Protocol::ftp:
file: lib/LWP/Protocol/ftp.pm
- version: '6.41'
+ version: '6.42'
LWP::Protocol::gopher:
file: lib/LWP/Protocol/gopher.pm
- version: '6.41'
+ version: '6.42'
LWP::Protocol::http:
file: lib/LWP/Protocol/http.pm
- version: '6.41'
+ version: '6.42'
LWP::Protocol::loopback:
file: lib/LWP/Protocol/loopback.pm
- version: '6.41'
+ version: '6.42'
LWP::Protocol::mailto:
file: lib/LWP/Protocol/mailto.pm
- version: '6.41'
+ version: '6.42'
LWP::Protocol::nntp:
file: lib/LWP/Protocol/nntp.pm
- version: '6.41'
+ version: '6.42'
LWP::Protocol::nogo:
file: lib/LWP/Protocol/nogo.pm
- version: '6.41'
+ version: '6.42'
LWP::RobotUA:
file: lib/LWP/RobotUA.pm
- version: '6.41'
+ version: '6.42'
LWP::Simple:
file: lib/LWP/Simple.pm
- version: '6.41'
+ version: '6.42'
LWP::UserAgent:
file: lib/LWP/UserAgent.pm
- version: '6.41'
+ version: '6.42'
requires:
Digest::MD5: '0'
Encode: '2.12'
@@ -134,7 +134,7 @@
bugtracker: https://github.com/libwww-perl/libwww-perl/issues
homepage: https://github.com/libwww-perl/libwww-perl
repository: https://github.com/libwww-perl/libwww-perl.git
-version: '6.41'
+version: '6.42'
x_Dist_Zilla:
perl:
version: '5.030000'
@@ -591,7 +591,7 @@
branch: ~
changelog: Changes
signed: 0
- tag: v6.41
+ tag: v6.42
tag_format: v%V
tag_message: v%V
Dist::Zilla::Role::Git::Repo:
@@ -730,6 +730,7 @@
- 'Doug Bell <[email protected]>'
- 'Fabian Zeindler <[email protected]>'
- 'Father Chrysostomos <[email protected]>'
+ - 'Frank Maas <[email protected]>'
- 'FWILES <[email protected]>'
- 'Gavin Peters <[email protected]>'
- 'Gerhard Poul <[email protected]>'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/Makefile.PL
new/libwww-perl-6.42/Makefile.PL
--- old/libwww-perl-6.41/Makefile.PL 2019-10-28 15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/Makefile.PL 2019-11-20 18:40:55.000000000 +0100
@@ -86,7 +86,7 @@
"Test::Needs" => 0,
"Test::RequiresInternet" => 0
},
- "VERSION" => "6.41",
+ "VERSION" => "6.42",
"test" => {
"TESTS" => "t/*.t t/base/*.t t/base/protocols/*.t t/leak/*.t t/local/*.t
t/robot/*.t"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Authen/Basic.pm
new/libwww-perl-6.42/lib/LWP/Authen/Basic.pm
--- old/libwww-perl-6.41/lib/LWP/Authen/Basic.pm 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/lib/LWP/Authen/Basic.pm 2019-11-20
18:40:55.000000000 +0100
@@ -2,7 +2,7 @@
use strict;
-our $VERSION = '6.41';
+our $VERSION = '6.42';
require MIME::Base64;
@@ -11,6 +11,10 @@
return "Basic " . MIME::Base64::encode("$user:$pass", "");
}
+sub _reauth_requested {
+ return 0;
+}
+
sub authenticate
{
my($class, $ua, $proxy, $auth_param, $response,
@@ -37,9 +41,15 @@
});
$h->{auth_param} = $auth_param;
- if (!$proxy && !$request->header($auth_header) &&
$ua->credentials($host_port, $realm)) {
- # we can make sure this handler applies and retry
- add_path($h, $url->path);
+ my $reauth_requested
+ = $class->_reauth_requested($auth_param, $ua, $request, $auth_header);
+ if ( !$proxy
+ && (!$request->header($auth_header) || $reauth_requested)
+ && $ua->credentials($host_port, $realm))
+ {
+ # we can make sure this handler applies and retry
+ add_path($h, $url->path)
+ unless $reauth_requested; # Do not clobber up path list for
retries
return $ua->request($request->clone, $arg, $size, $response);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Authen/Digest.pm
new/libwww-perl-6.42/lib/LWP/Authen/Digest.pm
--- old/libwww-perl-6.41/lib/LWP/Authen/Digest.pm 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/lib/LWP/Authen/Digest.pm 2019-11-20
18:40:55.000000000 +0100
@@ -3,10 +3,23 @@
use strict;
use base 'LWP::Authen::Basic';
-our $VERSION = '6.41';
+our $VERSION = '6.42';
require Digest::MD5;
+sub _reauth_requested {
+ my ($class, $auth_param, $ua, $request, $auth_header) = @_;
+ my $ret = defined($$auth_param{stale}) && lc($$auth_param{stale}) eq
'true';
+ if ($ret) {
+ my $hdr = $request->header($auth_header);
+ $hdr =~ tr/,/;/; # "," is used to separate auth-params!!
+ ($hdr) = HTTP::Headers::Util::split_header_words($hdr);
+ my $nonce = {@$hdr}->{nonce};
+ delete $$ua{authen_md5_nonce_count}{$nonce};
+ }
+ return $ret;
+}
+
sub auth_header {
my($class, $user, $pass, $request, $ua, $h) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Authen/Ntlm.pm
new/libwww-perl-6.42/lib/LWP/Authen/Ntlm.pm
--- old/libwww-perl-6.41/lib/LWP/Authen/Ntlm.pm 2019-10-28 15:42:10.000000000
+0100
+++ new/libwww-perl-6.42/lib/LWP/Authen/Ntlm.pm 2019-11-20 18:40:55.000000000
+0100
@@ -2,7 +2,7 @@
use strict;
-our $VERSION = '6.41';
+our $VERSION = '6.42';
use Authen::NTLM "1.02";
use MIME::Base64 "2.12";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/ConnCache.pm
new/libwww-perl-6.42/lib/LWP/ConnCache.pm
--- old/libwww-perl-6.41/lib/LWP/ConnCache.pm 2019-10-28 15:42:10.000000000
+0100
+++ new/libwww-perl-6.42/lib/LWP/ConnCache.pm 2019-11-20 18:40:55.000000000
+0100
@@ -2,7 +2,7 @@
use strict;
-our $VERSION = '6.41';
+our $VERSION = '6.42';
our $DEBUG;
sub new {
@@ -201,7 +201,7 @@
This method constructs a new L<LWP::ConnCache> object. The only
option currently accepted is C<total_capacity>. If specified it
-initialize the L<LWP::ConnCache/total_capacity> option. It defaults to C<1>.
+initializes the L<LWP::ConnCache/total_capacity> option. It defaults to C<1>.
=head2 total_capacity
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Debug/TraceHTTP.pm
new/libwww-perl-6.42/lib/LWP/Debug/TraceHTTP.pm
--- old/libwww-perl-6.41/lib/LWP/Debug/TraceHTTP.pm 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/lib/LWP/Debug/TraceHTTP.pm 2019-11-20
18:40:55.000000000 +0100
@@ -11,7 +11,7 @@
use strict;
use base 'LWP::Protocol::http';
-our $VERSION = '6.41';
+our $VERSION = '6.42';
package # hide from PAUSE
LWP::Debug::TraceHTTP::Socket;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Debug.pm
new/libwww-perl-6.42/lib/LWP/Debug.pm
--- old/libwww-perl-6.41/lib/LWP/Debug.pm 2019-10-28 15:42:10.000000000
+0100
+++ new/libwww-perl-6.42/lib/LWP/Debug.pm 2019-11-20 18:40:55.000000000
+0100
@@ -1,6 +1,6 @@
package LWP::Debug; # legacy
-our $VERSION = '6.41';
+our $VERSION = '6.42';
require Exporter;
our @ISA = qw(Exporter);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/DebugFile.pm
new/libwww-perl-6.42/lib/LWP/DebugFile.pm
--- old/libwww-perl-6.41/lib/LWP/DebugFile.pm 2019-10-28 15:42:10.000000000
+0100
+++ new/libwww-perl-6.42/lib/LWP/DebugFile.pm 2019-11-20 18:40:55.000000000
+0100
@@ -1,6 +1,6 @@
package LWP::DebugFile;
-our $VERSION = '6.41';
+our $VERSION = '6.42';
# legacy stub
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/MemberMixin.pm
new/libwww-perl-6.42/lib/LWP/MemberMixin.pm
--- old/libwww-perl-6.41/lib/LWP/MemberMixin.pm 2019-10-28 15:42:10.000000000
+0100
+++ new/libwww-perl-6.42/lib/LWP/MemberMixin.pm 2019-11-20 18:40:55.000000000
+0100
@@ -1,6 +1,6 @@
package LWP::MemberMixin;
-our $VERSION = '6.41';
+our $VERSION = '6.42';
sub _elem {
my $self = shift;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Protocol/cpan.pm
new/libwww-perl-6.42/lib/LWP/Protocol/cpan.pm
--- old/libwww-perl-6.41/lib/LWP/Protocol/cpan.pm 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/lib/LWP/Protocol/cpan.pm 2019-11-20
18:40:55.000000000 +0100
@@ -4,7 +4,7 @@
use base qw(LWP::Protocol);
-our $VERSION = '6.41';
+our $VERSION = '6.42';
require URI;
require HTTP::Status;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Protocol/data.pm
new/libwww-perl-6.42/lib/LWP/Protocol/data.pm
--- old/libwww-perl-6.41/lib/LWP/Protocol/data.pm 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/lib/LWP/Protocol/data.pm 2019-11-20
18:40:55.000000000 +0100
@@ -4,7 +4,7 @@
use strict;
-our $VERSION = '6.41';
+our $VERSION = '6.42';
require HTTP::Response;
require HTTP::Status;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Protocol/file.pm
new/libwww-perl-6.42/lib/LWP/Protocol/file.pm
--- old/libwww-perl-6.41/lib/LWP/Protocol/file.pm 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/lib/LWP/Protocol/file.pm 2019-11-20
18:40:55.000000000 +0100
@@ -4,7 +4,7 @@
use strict;
-our $VERSION = '6.41';
+our $VERSION = '6.42';
require LWP::MediaTypes;
require HTTP::Request;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Protocol/ftp.pm
new/libwww-perl-6.42/lib/LWP/Protocol/ftp.pm
--- old/libwww-perl-6.41/lib/LWP/Protocol/ftp.pm 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/lib/LWP/Protocol/ftp.pm 2019-11-20
18:40:55.000000000 +0100
@@ -5,7 +5,7 @@
use base qw(LWP::Protocol);
use strict;
-our $VERSION = '6.41';
+our $VERSION = '6.42';
use Carp ();
use HTTP::Status ();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Protocol/gopher.pm
new/libwww-perl-6.42/lib/LWP/Protocol/gopher.pm
--- old/libwww-perl-6.41/lib/LWP/Protocol/gopher.pm 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/lib/LWP/Protocol/gopher.pm 2019-11-20
18:40:55.000000000 +0100
@@ -9,7 +9,7 @@
use strict;
-our $VERSION = '6.41';
+our $VERSION = '6.42';
require HTTP::Response;
require HTTP::Status;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Protocol/http.pm
new/libwww-perl-6.42/lib/LWP/Protocol/http.pm
--- old/libwww-perl-6.41/lib/LWP/Protocol/http.pm 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/lib/LWP/Protocol/http.pm 2019-11-20
18:40:55.000000000 +0100
@@ -2,7 +2,7 @@
use strict;
-our $VERSION = '6.41';
+our $VERSION = '6.42';
require HTTP::Response;
require HTTP::Status;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Protocol/loopback.pm
new/libwww-perl-6.42/lib/LWP/Protocol/loopback.pm
--- old/libwww-perl-6.41/lib/LWP/Protocol/loopback.pm 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/lib/LWP/Protocol/loopback.pm 2019-11-20
18:40:55.000000000 +0100
@@ -2,7 +2,7 @@
use strict;
-our $VERSION = '6.41';
+our $VERSION = '6.42';
require HTTP::Response;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Protocol/mailto.pm
new/libwww-perl-6.42/lib/LWP/Protocol/mailto.pm
--- old/libwww-perl-6.41/lib/LWP/Protocol/mailto.pm 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/lib/LWP/Protocol/mailto.pm 2019-11-20
18:40:55.000000000 +0100
@@ -11,7 +11,7 @@
use Carp;
use strict;
-our $VERSION = '6.41';
+our $VERSION = '6.42';
use base qw(LWP::Protocol);
our $SENDMAIL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Protocol/nntp.pm
new/libwww-perl-6.42/lib/LWP/Protocol/nntp.pm
--- old/libwww-perl-6.41/lib/LWP/Protocol/nntp.pm 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/lib/LWP/Protocol/nntp.pm 2019-11-20
18:40:55.000000000 +0100
@@ -4,7 +4,7 @@
use base qw(LWP::Protocol);
-our $VERSION = '6.41';
+our $VERSION = '6.42';
require HTTP::Response;
require HTTP::Status;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Protocol/nogo.pm
new/libwww-perl-6.42/lib/LWP/Protocol/nogo.pm
--- old/libwww-perl-6.41/lib/LWP/Protocol/nogo.pm 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/lib/LWP/Protocol/nogo.pm 2019-11-20
18:40:55.000000000 +0100
@@ -7,7 +7,7 @@
use strict;
-our $VERSION = '6.41';
+our $VERSION = '6.42';
require HTTP::Response;
require HTTP::Status;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Protocol.pm
new/libwww-perl-6.42/lib/LWP/Protocol.pm
--- old/libwww-perl-6.41/lib/LWP/Protocol.pm 2019-10-28 15:42:10.000000000
+0100
+++ new/libwww-perl-6.42/lib/LWP/Protocol.pm 2019-11-20 18:40:55.000000000
+0100
@@ -2,7 +2,7 @@
use base 'LWP::MemberMixin';
-our $VERSION = '6.41';
+our $VERSION = '6.42';
use strict;
use Carp ();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/RobotUA.pm
new/libwww-perl-6.42/lib/LWP/RobotUA.pm
--- old/libwww-perl-6.41/lib/LWP/RobotUA.pm 2019-10-28 15:42:10.000000000
+0100
+++ new/libwww-perl-6.42/lib/LWP/RobotUA.pm 2019-11-20 18:40:55.000000000
+0100
@@ -2,7 +2,7 @@
use base qw(LWP::UserAgent);
-our $VERSION = '6.41';
+our $VERSION = '6.42';
require WWW::RobotRules;
require HTTP::Request;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/Simple.pm
new/libwww-perl-6.42/lib/LWP/Simple.pm
--- old/libwww-perl-6.41/lib/LWP/Simple.pm 2019-10-28 15:42:10.000000000
+0100
+++ new/libwww-perl-6.42/lib/LWP/Simple.pm 2019-11-20 18:40:55.000000000
+0100
@@ -2,7 +2,7 @@
use strict;
-our $VERSION = '6.41';
+our $VERSION = '6.42';
require Exporter;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP/UserAgent.pm
new/libwww-perl-6.42/lib/LWP/UserAgent.pm
--- old/libwww-perl-6.41/lib/LWP/UserAgent.pm 2019-10-28 15:42:10.000000000
+0100
+++ new/libwww-perl-6.42/lib/LWP/UserAgent.pm 2019-11-20 18:40:55.000000000
+0100
@@ -15,7 +15,7 @@
use Scalar::Util qw(blessed);
use Try::Tiny qw(try catch);
-our $VERSION = '6.41';
+our $VERSION = '6.42';
sub new
{
@@ -489,6 +489,21 @@
return $self->request( HTTP::Request::Common::HEAD( @parameters ), @suff );
}
+sub patch {
+ require HTTP::Request::Common;
+ my($self, @parameters) = @_;
+ my @suff = $self->_process_colonic_headers(\@parameters,
(ref($parameters[1]) ? 2 : 1));
+
+ # this work-around is in place as HTTP::Request::Common
+ # did not implement a patch convenience method until
+ # version 6.12. Once we can bump the prereq to at least
+ # that version, we can use ::PATCH instead of this hack
+ my $req = HTTP::Request::Common::PUT(@parameters);
+ $req->method('PATCH');
+
+ $self->_maybe_copy_default_content_type($req, @parameters);
+ return $self->request($req, @suff);
+}
sub put {
require HTTP::Request::Common;
@@ -1249,7 +1264,7 @@
variables (see L<LWP::UserAgent/env_proxy>). If C<env_proxy> isn't provided,
the
C<PERL_LWP_ENV_PROXY> environment variable controls if
L<LWP::UserAgent/env_proxy> is called during initialization. If the
-C<keep_alive> option is passed in, then a C<LWP::ConnCache> is set up (see
+C<keep_alive> option value is defined and non-zero, then an C<LWP::ConnCache>
is set up (see
L<LWP::UserAgent/conn_cache>). The C<keep_alive> value is passed on as the
C<total_capacity> for the connection cache.
@@ -1874,6 +1889,33 @@
The return value is an L<HTTP::Response> object.
+=head2 patch
+ # Any version of HTTP::Message works with this form:
+ my $res = $ua->patch( $url, $field_name => $value, Content => $content );
+
+ # Using hash or array references requires HTTP::Message >= 6.12
+ use HTTP::Request 6.12;
+ my $res = $ua->patch( $url, \%form );
+ my $res = $ua->patch( $url, \@form );
+ my $res = $ua->patch( $url, \%form, $field_name => $value, ... );
+ my $res = $ua->patch( $url, $field_name => $value, Content => \%form );
+ my $res = $ua->patch( $url, $field_name => $value, Content => \@form );
+
+This method will dispatch a C<PATCH> request on the given URL, with
+C<%form> or C<@form> providing the key/value pairs for the fill-in form
+content. Additional headers and content options are the same as for
+the L<LWP::UserAgent/get> method.
+
+CAVEAT:
+
+This method can only accept content that is in key-value pairs when using
+L<HTTP::Request::Common> prior to version C<6.12>. Any use of hash or array
+references will result in an error prior to version C<6.12>.
+
+This method will use the C<PATCH> function from L<HTTP::Request::Common>
+to build the request. See L<HTTP::Request::Common> for a details on
+how to pass form content and other advanced features.
+
=head2 post
my $res = $ua->post( $url, \%form );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/lib/LWP.pm
new/libwww-perl-6.42/lib/LWP.pm
--- old/libwww-perl-6.41/lib/LWP.pm 2019-10-28 15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/lib/LWP.pm 2019-11-20 18:40:55.000000000 +0100
@@ -1,6 +1,6 @@
package LWP;
-our $VERSION = '6.41';
+our $VERSION = '6.42';
require LWP::UserAgent; # this should load everything you need
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/t/base/default_content_type.t
new/libwww-perl-6.42/t/base/default_content_type.t
--- old/libwww-perl-6.41/t/base/default_content_type.t 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/t/base/default_content_type.t 2019-11-20
18:40:55.000000000 +0100
@@ -4,7 +4,7 @@
use LWP::UserAgent;
use HTTP::Request ();
-plan tests => 4;
+plan tests => 6;
# Prevent environment from interfering with test:
delete $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME};
@@ -17,8 +17,9 @@
# we can only use HTTP::Request >= 6.07
my $ver = $HTTP::Request::VERSION || '6.00';
my $ver_ok = eval {HTTP::Request->VERSION("6.07");};
-diag "Some tests for the PUT method can only be run on ";
-diag "HTTP::Request version 6.07 or higher.";
+my $patch_ver_ok = eval {HTTP::Request->VERSION("6.12");};
+diag "Some tests for the PUT/PATCH methods can only be run on ";
+diag "HTTP::Request version 6.07/6.12 or higher.";
diag "If your version isn't good enough, we'll skip those.";
diag "Your version is $ver and that's ". ($ver_ok ? '' : 'not '). 'good
enough';
@@ -32,6 +33,27 @@
$ua->agent("foo/0.1");
# These forms will all be x-www-form-urlencoded
+subtest 'PATCH x-www-form-urlencoded' => sub {
+ plan skip_all => "HTTP::Request version not high enough" unless
$patch_ver_ok;
+ plan tests => 4;
+ for my $arg (
+ [ { cat => 'dog' } ],
+ [ [ cat => 'dog' ] ],
+ [ Content => { cat => 'dog' }, ],
+ [ Content => [ cat => 'dog' ], ],
+ ) {
+ is ($ua->patch($url, @$arg)->content, <<"EOT", "patch @$arg");
+PATCH http://www.example.com
+User-Agent: foo/0.1
+Content-Length: 7
+Content-Type: application/x-www-form-urlencoded
+
+cat=dog
+EOT
+ }
+};
+
+# These forms will all be x-www-form-urlencoded
subtest 'PUT x-www-form-urlencoded' => sub {
plan skip_all => "HTTP::Request version not high enough" unless $ver_ok;
plan tests => 4;
@@ -73,7 +95,7 @@
};
# These should all use the default
-for my $call (qw(post put)) {
+for my $call (qw(post put patch)) {
my $ucall = uc $call;
my $arg = [ Content => '{"cat":"dog"}' ];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/t/base/ua.t
new/libwww-perl-6.42/t/base/ua.t
--- old/libwww-perl-6.41/t/base/ua.t 2019-10-28 15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/t/base/ua.t 2019-11-20 18:40:55.000000000 +0100
@@ -4,7 +4,7 @@
use LWP::UserAgent ();
use Test::More;
-plan tests => 41;
+plan tests => 46;
# Prevent environment from interfering with test:
delete $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME};
@@ -104,6 +104,17 @@
x=y&f=ff
EOT
+ok($ua->patch("http://www.example.com", [x => "y", f => "ff"])->content,
<<EOT);
+PATCH http://www.example.com
+User-Agent: foo/0.1
+Content-Length: 8
+Content-Type: application/x-www-form-urlencoded
+Foo: bar
+Multi: 1
+Multi: 2
+x=y&f=ff
+EOT
+
is(ref($clone->{proxy}), 'HASH', 'ref($clone->{proxy})');
is($ua->proxy(http => undef), "loopback:", '$ua->proxy(http => undef)');
@@ -164,3 +175,12 @@
is($ua->proxy('http'), "http://example.com", "\$ua->proxy('http')");
$ua = LWP::UserAgent->new(env_proxy => 0);
is($ua->proxy('http'), undef, "\$ua->proxy('http')");
+
+$ua = LWP::UserAgent->new();
+is($ua->conn_cache, undef, "\$ua->conn_cache");
+$ua = LWP::UserAgent->new(keep_alive => undef);
+is($ua->conn_cache, undef, "\$ua->conn_cache");
+$ua = LWP::UserAgent->new(keep_alive => 0);
+is($ua->conn_cache, undef, "\$ua->conn_cache");
+$ua = LWP::UserAgent->new(keep_alive => 1);
+is($ua->conn_cache->total_capacity, 1, "\$ua->conn_cache->total_capacity");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/t/local/http.t
new/libwww-perl-6.42/t/local/http.t
--- old/libwww-perl-6.41/t/local/http.t 2019-10-28 15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/t/local/http.t 2019-11-20 18:40:55.000000000 +0100
@@ -63,7 +63,7 @@
return plan skip_all => 'We could not talk to our daemon' unless $DAEMON;
return plan skip_all => 'No base URI' unless $base;
- plan tests => 96;
+ plan tests => 106;
my $ua = LWP::UserAgent->new;
$ua->agent("Mozilla/0.01 " . $ua->agent);
@@ -127,6 +127,17 @@
isa_ok($res, 'HTTP::Response', 'simple echo 2: good response object');
is($res->code, 200, 'simple echo 2: code 200');
}
+ { # patch
+ my $res = $ua->patch(url("/echo/path_info?query", $base),
+ Accept => 'text/html',
+ Accept => 'text/plain; q=0.9',
+ Accept => 'image/*',
+ X_Foo => "Bar",
+ );
+ isa_ok($res, 'HTTP::Response', 'patch: good response object');
+ is($res->code, 200, 'put: code 200');
+ like($res->content, qr/^From: gisle\@aas.no$/m, 'patch: good From');
+ }
{ # put
my $res = $ua->put(url("/echo/path_info?query", $base),
Accept => 'text/html',
@@ -254,6 +265,48 @@
isa_ok($res, 'HTTP::Response', 'digestAuth: good response object');
ok($res->is_success, 'digestAuth: is_success');
+ # Now check expired nonce
+ # - get the right request_prepare handler
+ my ($digest)
+ = grep { $$_{realm} eq "libwww-perl-digest" }
+ @{$$ua{handlers}{request_prepare}};
+
+ # - and force the next request to send the wrongnonce first
+ $$digest{auth_param}{nonce} = "my_stale_nonce";
+
+ # - set up the nonce count for the stale nonce and lose it for the
real nonce (to make it match later (server expects 1))
+ $$ua{authen_md5_nonce_count} = {my_stale_nonce => 3};
+
+ # - perform the request with the stale nonce
+ $ua->credentials($req->uri->host_port, "libwww-perl-digest", "ok 23",
+ "xyzzy");
+ $res = $ua->request($req);
+ isa_ok($res, 'HTTP::Response', 'digestAuth: good response object');
+ ok($res->is_success, 'digestAuth: is_success');
+
+ is($$ua{authen_md5_nonce_count}{12345},
+ 1, 'The nonce count is recorded for the new nonce');
+ ok(
+ !defined $$ua{authen_md5_nonce_count}{my_stale_nonce},
+ 'The nonce count is deleted for the stale nonce'
+ );
+ is(@{$$digest{m_path_prefix}}, 1,
+ 'The path prefix list is not clobbered with extra copies of the
path'
+ );
+
+ # - perform the request with a wrong nonce
+ $$digest{auth_param}{nonce} = "my_wrong_nonce";
+
+ # - lose the nonce count, to make it match later (server expects 1)
+ $$ua{authen_md5_nonce_count} = {};
+
+ # - perform the request with the wrong nonce
+ $ua->credentials($req->uri->host_port, "libwww-perl-digest", "ok 23",
+ "xyzzy");
+ $res = $ua->request($req);
+ isa_ok($res, 'HTTP::Response', 'digestAuth: good response object');
+ is($res->code, 401, 'No retry if the nonce is not marked stale');
+
# Then illegal credentials
$ua->credentials($req->uri->host_port, "libwww-perl-digest", "user2",
"passwd");
$res = $ua->request($req);
@@ -409,7 +462,14 @@
}
else {
$c->send_basic_header(401);
- $c->print("WWW-Authenticate: Digest realm=\"libwww-perl-digest\",
nonce=\"12345\", qop=auth\015\012");
+ $c->print(
+ "WWW-Authenticate: Digest realm=\"libwww-perl-digest\",
nonce=\"12345\"",
+ defined($auth_params{nonce})
+ && $auth_params{nonce} eq '"my_stale_nonce"'
+ ? ', stale=true'
+ : '',
+ ", qop=auth\015\012"
+ );
$c->send_crlf;
}
};
@@ -472,6 +532,13 @@
unlink("tmp$$");
};
+ $router{patch_echo} = sub {
+ my($c, $req) = @_;
+ $c->send_basic_header(200);
+ $c->print("Content-Type: message/http\015\012");
+ $c->send_crlf;
+ $c->print($req->as_string);
+ };
$router{put_echo} = sub {
my($c, $req) = @_;
$c->send_basic_header(200);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/xt/author/live/jigsaw/te.t
new/libwww-perl-6.42/xt/author/live/jigsaw/te.t
--- old/libwww-perl-6.41/xt/author/live/jigsaw/te.t 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/xt/author/live/jigsaw/te.t 2019-11-20
18:40:55.000000000 +0100
@@ -6,25 +6,34 @@
use HTTP::Request;
use LWP::UserAgent;
-plan tests => 9;
+SKIP: {
+ skip 'LIVE_JIGSAW_TESTS not enabled', 3 if $ENV{NO_JIGSAW};
-my $ua = LWP::UserAgent->new(keep_alive => 1);
+ my $ua = LWP::UserAgent->new(keep_alive => 1);
-my $content;
-for my $te (undef, "", "deflate", "gzip", "trailers, deflate;q=0.4,
identity;q=0.1") {
- my $req = HTTP::Request->new(GET =>
"http://jigsaw.w3.org/HTTP/TE/foo.txt");
+ my $content;
+ my @te = (
+ undef, q{}, 'deflate', 'gzip', 'trailers, deflate;q=0.4,
identity;q=0.1',
+ );
- if (defined $te) {
- $req->header(TE => $te);
- $req->header(Connection => "TE");
- }
+ for my $te (@te) {
+ my $req
+ = HTTP::Request->new(GET =>
'http://jigsaw.w3.org/HTTP/TE/foo.txt');
- my $res = $ua->request($req);
- isa_ok($res, 'HTTP::Response', 'request: Got a proper response');
- if (defined $content) {
- is($res->content, $content, 'content: Correct content');
- }
- else {
- $content = $res->content;
+ if (defined $te) {
+ $req->header(TE => $te);
+ $req->header(Connection => 'TE');
+ }
+
+ my $res = $ua->request($req);
+ isa_ok($res, 'HTTP::Response', 'request: Got a proper response');
+ if (defined $content) {
+ is($res->content, $content, 'content: Correct content');
+ }
+ else {
+ $content = $res->content;
+ }
}
}
+
+done_testing();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/xt/author/pod-spell.t
new/libwww-perl-6.42/xt/author/pod-spell.t
--- old/libwww-perl-6.41/xt/author/pod-spell.t 2019-10-28 15:42:10.000000000
+0100
+++ new/libwww-perl-6.42/xt/author/pod-spell.t 2019-11-20 18:40:55.000000000
+0100
@@ -76,6 +76,7 @@
Fiegehenn
Finch
Fowler
+Frank
Froehlich
Gavin
Gerhard
@@ -152,6 +153,7 @@
Lotterer
Lundin
Lutz
+Maas
MacEachern
Macdonald
Madsen
@@ -342,6 +344,7 @@
lib
loopback
lwp
+maas
mailto
mark
martin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libwww-perl-6.41/xt/release/changes_has_content.t
new/libwww-perl-6.42/xt/release/changes_has_content.t
--- old/libwww-perl-6.41/xt/release/changes_has_content.t 2019-10-28
15:42:10.000000000 +0100
+++ new/libwww-perl-6.42/xt/release/changes_has_content.t 2019-11-20
18:40:55.000000000 +0100
@@ -8,7 +8,7 @@
note 'Checking Changes';
my $changes_file = 'Changes';
-my $newver = '6.41';
+my $newver = '6.42';
my $trial_token = '-TRIAL';
my $encoding = 'UTF-8';