From 4cccc722262818fdec6a4e49c0028a1a6c27af68 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Thu, 21 Jul 2022 11:28:26 +0900 Subject: [PATCH] Imported Upstream version 6.47 --- Changes | 4 ++ META.json | 80 ++++++++++++++++---------------- META.yml | 80 ++++++++++++++++---------------- Makefile.PL | 2 +- lib/LWP.pm | 2 +- lib/LWP/Authen/Basic.pm | 2 +- lib/LWP/Authen/Digest.pm | 2 +- lib/LWP/Authen/Ntlm.pm | 2 +- lib/LWP/ConnCache.pm | 2 +- lib/LWP/Debug.pm | 2 +- lib/LWP/Debug/TraceHTTP.pm | 2 +- lib/LWP/DebugFile.pm | 2 +- lib/LWP/MemberMixin.pm | 2 +- lib/LWP/Protocol.pm | 2 +- lib/LWP/Protocol/cpan.pm | 2 +- lib/LWP/Protocol/data.pm | 2 +- lib/LWP/Protocol/file.pm | 2 +- lib/LWP/Protocol/ftp.pm | 2 +- lib/LWP/Protocol/gopher.pm | 2 +- lib/LWP/Protocol/http.pm | 2 +- lib/LWP/Protocol/loopback.pm | 2 +- lib/LWP/Protocol/mailto.pm | 2 +- lib/LWP/Protocol/nntp.pm | 2 +- lib/LWP/Protocol/nogo.pm | 2 +- lib/LWP/RobotUA.pm | 2 +- lib/LWP/Simple.pm | 2 +- lib/LWP/UserAgent.pm | 7 ++- t/local/http.t | 17 ++++++- xt/release/changes_has_content.t | 2 +- 29 files changed, 129 insertions(+), 107 deletions(-) diff --git a/Changes b/Changes index 6a70da0..4a2ea07 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Change history for libwww-perl +6.47 2020-08-18 15:27:27Z + - Only add cookies from the jar if there aren't cookies in the request + (GH#347) (Doug Bell and Olaf Alders) + 6.46 2020-06-23 21:19:26Z - Fix a looping regression in 6.45 for redirect responses without a Location header (GH PR#342, Niko Tyni) diff --git a/META.json b/META.json index f1ed416..b7867f2 100644 --- a/META.json +++ b/META.json @@ -109,96 +109,96 @@ "provides" : { "LWP" : { "file" : "lib/LWP.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Authen::Basic" : { "file" : "lib/LWP/Authen/Basic.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Authen::Digest" : { "file" : "lib/LWP/Authen/Digest.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Authen::Ntlm" : { "file" : "lib/LWP/Authen/Ntlm.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::ConnCache" : { "file" : "lib/LWP/ConnCache.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Debug" : { "file" : "lib/LWP/Debug.pm", - "version" : "6.46", + "version" : "6.47", "x_deprecated" : 1 }, "LWP::Debug::TraceHTTP" : { "file" : "lib/LWP/Debug/TraceHTTP.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::DebugFile" : { "file" : "lib/LWP/DebugFile.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::MemberMixin" : { "file" : "lib/LWP/MemberMixin.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Protocol" : { "file" : "lib/LWP/Protocol.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Protocol::cpan" : { "file" : "lib/LWP/Protocol/cpan.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Protocol::data" : { "file" : "lib/LWP/Protocol/data.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Protocol::file" : { "file" : "lib/LWP/Protocol/file.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Protocol::ftp" : { "file" : "lib/LWP/Protocol/ftp.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Protocol::gopher" : { "file" : "lib/LWP/Protocol/gopher.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Protocol::http" : { "file" : "lib/LWP/Protocol/http.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Protocol::loopback" : { "file" : "lib/LWP/Protocol/loopback.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Protocol::mailto" : { "file" : "lib/LWP/Protocol/mailto.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Protocol::nntp" : { "file" : "lib/LWP/Protocol/nntp.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Protocol::nogo" : { "file" : "lib/LWP/Protocol/nogo.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::RobotUA" : { "file" : "lib/LWP/RobotUA.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::Simple" : { "file" : "lib/LWP/Simple.pm", - "version" : "6.46" + "version" : "6.47" }, "LWP::UserAgent" : { "file" : "lib/LWP/UserAgent.pm", - "version" : "6.46" + "version" : "6.47" } }, "release_status" : "stable", @@ -215,10 +215,10 @@ "x_IRC" : "irc://irc.perl.org/#lwp", "x_MailingList" : "mailto:libwww@perl.org" }, - "version" : "6.46", + "version" : "6.47", "x_Dist_Zilla" : { "perl" : { - "version" : "5.030002" + "version" : "5.026001" }, "plugins" : [ { @@ -269,8 +269,8 @@ "meta_noindex" : 1 }, "Dist::Zilla::Role::ModuleMetadata" : { - "Module::Metadata" : "1.000036", - "version" : "0.006" + "Module::Metadata" : "1.000037", + "version" : "0.004" } }, "name" : "MetaProvides::Package", @@ -313,7 +313,7 @@ "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { - "git_version" : "2.26.2", + "git_version" : "2.28.0", "include_authors" : 0, "include_releaser" : 1, "order_by" : "name", @@ -347,8 +347,8 @@ "class" : "Dist::Zilla::Plugin::InstallGuide", "config" : { "Dist::Zilla::Role::ModuleMetadata" : { - "Module::Metadata" : "1.000036", - "version" : "0.006" + "Module::Metadata" : "1.000037", + "version" : "0.004" } }, "name" : "InstallGuide", @@ -368,8 +368,8 @@ "class" : "Dist::Zilla::Plugin::DynamicPrereqs", "config" : { "Dist::Zilla::Role::ModuleMetadata" : { - "Module::Metadata" : "1.000036", - "version" : "0.006" + "Module::Metadata" : "1.000037", + "version" : "0.004" } }, "name" : "DynamicPrereqs", @@ -633,7 +633,7 @@ "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { - "git_version" : "2.26.2", + "git_version" : "2.28.0", "repo_root" : "." } }, @@ -763,7 +763,7 @@ "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { - "git_version" : "2.26.2", + "git_version" : "2.28.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { @@ -780,12 +780,12 @@ "branch" : null, "changelog" : "Changes", "signed" : 0, - "tag" : "v6.46", + "tag" : "v6.47", "tag_format" : "v%V", "tag_message" : "v%V" }, "Dist::Zilla::Role::Git::Repo" : { - "git_version" : "2.26.2", + "git_version" : "2.28.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { @@ -835,7 +835,7 @@ "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { - "git_version" : "2.26.2", + "git_version" : "2.28.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { @@ -855,7 +855,7 @@ "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { - "git_version" : "2.26.2", + "git_version" : "2.28.0", "repo_root" : "." } }, @@ -1033,8 +1033,8 @@ "Yury Zavarin ", "Zefram " ], - "x_generated_by_perl" : "v5.30.2", - "x_serialization_backend" : "Cpanel::JSON::XS version 4.19", + "x_generated_by_perl" : "v5.26.1", + "x_serialization_backend" : "Cpanel::JSON::XS version 4.04", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" } diff --git a/META.yml b/META.yml index b2b914a..a416dbd 100644 --- a/META.yml +++ b/META.yml @@ -30,74 +30,74 @@ no_index: provides: LWP: file: lib/LWP.pm - version: '6.46' + version: '6.47' LWP::Authen::Basic: file: lib/LWP/Authen/Basic.pm - version: '6.46' + version: '6.47' LWP::Authen::Digest: file: lib/LWP/Authen/Digest.pm - version: '6.46' + version: '6.47' LWP::Authen::Ntlm: file: lib/LWP/Authen/Ntlm.pm - version: '6.46' + version: '6.47' LWP::ConnCache: file: lib/LWP/ConnCache.pm - version: '6.46' + version: '6.47' LWP::Debug: file: lib/LWP/Debug.pm - version: '6.46' + version: '6.47' x_deprecated: 1 LWP::Debug::TraceHTTP: file: lib/LWP/Debug/TraceHTTP.pm - version: '6.46' + version: '6.47' LWP::DebugFile: file: lib/LWP/DebugFile.pm - version: '6.46' + version: '6.47' LWP::MemberMixin: file: lib/LWP/MemberMixin.pm - version: '6.46' + version: '6.47' LWP::Protocol: file: lib/LWP/Protocol.pm - version: '6.46' + version: '6.47' LWP::Protocol::cpan: file: lib/LWP/Protocol/cpan.pm - version: '6.46' + version: '6.47' LWP::Protocol::data: file: lib/LWP/Protocol/data.pm - version: '6.46' + version: '6.47' LWP::Protocol::file: file: lib/LWP/Protocol/file.pm - version: '6.46' + version: '6.47' LWP::Protocol::ftp: file: lib/LWP/Protocol/ftp.pm - version: '6.46' + version: '6.47' LWP::Protocol::gopher: file: lib/LWP/Protocol/gopher.pm - version: '6.46' + version: '6.47' LWP::Protocol::http: file: lib/LWP/Protocol/http.pm - version: '6.46' + version: '6.47' LWP::Protocol::loopback: file: lib/LWP/Protocol/loopback.pm - version: '6.46' + version: '6.47' LWP::Protocol::mailto: file: lib/LWP/Protocol/mailto.pm - version: '6.46' + version: '6.47' LWP::Protocol::nntp: file: lib/LWP/Protocol/nntp.pm - version: '6.46' + version: '6.47' LWP::Protocol::nogo: file: lib/LWP/Protocol/nogo.pm - version: '6.46' + version: '6.47' LWP::RobotUA: file: lib/LWP/RobotUA.pm - version: '6.46' + version: '6.47' LWP::Simple: file: lib/LWP/Simple.pm - version: '6.46' + version: '6.47' LWP::UserAgent: file: lib/LWP/UserAgent.pm - version: '6.46' + version: '6.47' requires: Digest::MD5: '0' Encode: '2.12' @@ -134,10 +134,10 @@ resources: 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.46' +version: '6.47' x_Dist_Zilla: perl: - version: '5.030002' + version: '5.026001' plugins: - class: Dist::Zilla::Plugin::Git::GatherDir @@ -177,8 +177,8 @@ x_Dist_Zilla: inherit_version: '1' meta_noindex: '1' Dist::Zilla::Role::ModuleMetadata: - Module::Metadata: '1.000036' - version: '0.006' + Module::Metadata: '1.000037' + version: '0.004' name: MetaProvides::Package version: '2.004003' - @@ -210,7 +210,7 @@ x_Dist_Zilla: class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: - git_version: 2.26.2 + git_version: 2.28.0 include_authors: 0 include_releaser: 1 order_by: name @@ -237,8 +237,8 @@ x_Dist_Zilla: class: Dist::Zilla::Plugin::InstallGuide config: Dist::Zilla::Role::ModuleMetadata: - Module::Metadata: '1.000036' - version: '0.006' + Module::Metadata: '1.000037' + version: '0.004' name: InstallGuide version: '1.200013' - @@ -253,8 +253,8 @@ x_Dist_Zilla: class: Dist::Zilla::Plugin::DynamicPrereqs config: Dist::Zilla::Role::ModuleMetadata: - Module::Metadata: '1.000036' - version: '0.006' + Module::Metadata: '1.000037' + version: '0.004' name: DynamicPrereqs version: '0.037' - @@ -481,7 +481,7 @@ x_Dist_Zilla: allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: - git_version: 2.26.2 + git_version: 2.28.0 repo_root: . name: Git::Check version: '2.046' @@ -578,7 +578,7 @@ x_Dist_Zilla: allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: - git_version: 2.26.2 + git_version: 2.28.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local @@ -591,11 +591,11 @@ x_Dist_Zilla: branch: ~ changelog: Changes signed: 0 - tag: v6.46 + tag: v6.47 tag_format: v%V tag_message: v%V Dist::Zilla::Role::Git::Repo: - git_version: 2.26.2 + git_version: 2.28.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local @@ -632,7 +632,7 @@ x_Dist_Zilla: - (?^:^lib/.*\.pm$) changelog: Changes Dist::Zilla::Role::Git::Repo: - git_version: 2.26.2 + git_version: 2.28.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local @@ -646,7 +646,7 @@ x_Dist_Zilla: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: - git_version: 2.26.2 + git_version: 2.28.0 repo_root: . name: Git::Push version: '2.046' @@ -804,6 +804,6 @@ x_contributors: - 'Yuri Karaban ' - 'Yury Zavarin ' - 'Zefram ' -x_generated_by_perl: v5.30.2 -x_serialization_backend: 'YAML::Tiny version 1.73' +x_generated_by_perl: v5.26.1 +x_serialization_backend: 'YAML::Tiny version 1.70' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' diff --git a/Makefile.PL b/Makefile.PL index 70518f9..38ac1d6 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -86,7 +86,7 @@ my %WriteMakefileArgs = ( "Test::Needs" => 0, "Test::RequiresInternet" => 0 }, - "VERSION" => "6.46", + "VERSION" => "6.47", "test" => { "TESTS" => "t/*.t t/base/*.t t/base/protocols/*.t t/leak/*.t t/local/*.t t/robot/*.t" } diff --git a/lib/LWP.pm b/lib/LWP.pm index 7a0768f..822be8b 100644 --- a/lib/LWP.pm +++ b/lib/LWP.pm @@ -1,6 +1,6 @@ package LWP; -our $VERSION = '6.46'; +our $VERSION = '6.47'; require LWP::UserAgent; # this should load everything you need diff --git a/lib/LWP/Authen/Basic.pm b/lib/LWP/Authen/Basic.pm index 2f1b9a1..2beff04 100644 --- a/lib/LWP/Authen/Basic.pm +++ b/lib/LWP/Authen/Basic.pm @@ -2,7 +2,7 @@ package LWP::Authen::Basic; use strict; -our $VERSION = '6.46'; +our $VERSION = '6.47'; require Encode; require MIME::Base64; diff --git a/lib/LWP/Authen/Digest.pm b/lib/LWP/Authen/Digest.pm index 9fe7449..3430738 100644 --- a/lib/LWP/Authen/Digest.pm +++ b/lib/LWP/Authen/Digest.pm @@ -3,7 +3,7 @@ package LWP::Authen::Digest; use strict; use base 'LWP::Authen::Basic'; -our $VERSION = '6.46'; +our $VERSION = '6.47'; require Digest::MD5; diff --git a/lib/LWP/Authen/Ntlm.pm b/lib/LWP/Authen/Ntlm.pm index e13c1b4..1dce86a 100644 --- a/lib/LWP/Authen/Ntlm.pm +++ b/lib/LWP/Authen/Ntlm.pm @@ -2,7 +2,7 @@ package LWP::Authen::Ntlm; use strict; -our $VERSION = '6.46'; +our $VERSION = '6.47'; use Authen::NTLM "1.02"; use MIME::Base64 "2.12"; diff --git a/lib/LWP/ConnCache.pm b/lib/LWP/ConnCache.pm index 5a6cda1..73d3ce8 100644 --- a/lib/LWP/ConnCache.pm +++ b/lib/LWP/ConnCache.pm @@ -2,7 +2,7 @@ package LWP::ConnCache; use strict; -our $VERSION = '6.46'; +our $VERSION = '6.47'; our $DEBUG; sub new { diff --git a/lib/LWP/Debug.pm b/lib/LWP/Debug.pm index 9ff9cb4..c523e84 100644 --- a/lib/LWP/Debug.pm +++ b/lib/LWP/Debug.pm @@ -1,6 +1,6 @@ package LWP::Debug; # legacy -our $VERSION = '6.46'; +our $VERSION = '6.47'; require Exporter; our @ISA = qw(Exporter); diff --git a/lib/LWP/Debug/TraceHTTP.pm b/lib/LWP/Debug/TraceHTTP.pm index 3d9d7ae..fbf3663 100644 --- a/lib/LWP/Debug/TraceHTTP.pm +++ b/lib/LWP/Debug/TraceHTTP.pm @@ -11,7 +11,7 @@ package LWP::Debug::TraceHTTP; use strict; use base 'LWP::Protocol::http'; -our $VERSION = '6.46'; +our $VERSION = '6.47'; package # hide from PAUSE LWP::Debug::TraceHTTP::Socket; diff --git a/lib/LWP/DebugFile.pm b/lib/LWP/DebugFile.pm index 717a7b6..bf27e70 100644 --- a/lib/LWP/DebugFile.pm +++ b/lib/LWP/DebugFile.pm @@ -1,6 +1,6 @@ package LWP::DebugFile; -our $VERSION = '6.46'; +our $VERSION = '6.47'; # legacy stub diff --git a/lib/LWP/MemberMixin.pm b/lib/LWP/MemberMixin.pm index dc257d4..0ac6cf1 100644 --- a/lib/LWP/MemberMixin.pm +++ b/lib/LWP/MemberMixin.pm @@ -1,6 +1,6 @@ package LWP::MemberMixin; -our $VERSION = '6.46'; +our $VERSION = '6.47'; sub _elem { my $self = shift; diff --git a/lib/LWP/Protocol.pm b/lib/LWP/Protocol.pm index e78ef86..aeb0be1 100644 --- a/lib/LWP/Protocol.pm +++ b/lib/LWP/Protocol.pm @@ -2,7 +2,7 @@ package LWP::Protocol; use base 'LWP::MemberMixin'; -our $VERSION = '6.46'; +our $VERSION = '6.47'; use strict; use Carp (); diff --git a/lib/LWP/Protocol/cpan.pm b/lib/LWP/Protocol/cpan.pm index 2a787d8..2b32dc3 100644 --- a/lib/LWP/Protocol/cpan.pm +++ b/lib/LWP/Protocol/cpan.pm @@ -4,7 +4,7 @@ use strict; use base qw(LWP::Protocol); -our $VERSION = '6.46'; +our $VERSION = '6.47'; require URI; require HTTP::Status; diff --git a/lib/LWP/Protocol/data.pm b/lib/LWP/Protocol/data.pm index 6b471d9..6c6faad 100644 --- a/lib/LWP/Protocol/data.pm +++ b/lib/LWP/Protocol/data.pm @@ -4,7 +4,7 @@ package LWP::Protocol::data; use strict; -our $VERSION = '6.46'; +our $VERSION = '6.47'; require HTTP::Response; require HTTP::Status; diff --git a/lib/LWP/Protocol/file.pm b/lib/LWP/Protocol/file.pm index 44a5cb1..673029f 100644 --- a/lib/LWP/Protocol/file.pm +++ b/lib/LWP/Protocol/file.pm @@ -4,7 +4,7 @@ use base qw(LWP::Protocol); use strict; -our $VERSION = '6.46'; +our $VERSION = '6.47'; require LWP::MediaTypes; require HTTP::Request; diff --git a/lib/LWP/Protocol/ftp.pm b/lib/LWP/Protocol/ftp.pm index 0e2992d..0e22f2c 100644 --- a/lib/LWP/Protocol/ftp.pm +++ b/lib/LWP/Protocol/ftp.pm @@ -5,7 +5,7 @@ package LWP::Protocol::ftp; use base qw(LWP::Protocol); use strict; -our $VERSION = '6.46'; +our $VERSION = '6.47'; use Carp (); use HTTP::Status (); diff --git a/lib/LWP/Protocol/gopher.pm b/lib/LWP/Protocol/gopher.pm index 2d21772..8a7f803 100644 --- a/lib/LWP/Protocol/gopher.pm +++ b/lib/LWP/Protocol/gopher.pm @@ -9,7 +9,7 @@ package LWP::Protocol::gopher; use strict; -our $VERSION = '6.46'; +our $VERSION = '6.47'; require HTTP::Response; require HTTP::Status; diff --git a/lib/LWP/Protocol/http.pm b/lib/LWP/Protocol/http.pm index 8108ffc..89f7d2e 100644 --- a/lib/LWP/Protocol/http.pm +++ b/lib/LWP/Protocol/http.pm @@ -2,7 +2,7 @@ package LWP::Protocol::http; use strict; -our $VERSION = '6.46'; +our $VERSION = '6.47'; require HTTP::Response; require HTTP::Status; diff --git a/lib/LWP/Protocol/loopback.pm b/lib/LWP/Protocol/loopback.pm index 16b3a48..8b4546f 100644 --- a/lib/LWP/Protocol/loopback.pm +++ b/lib/LWP/Protocol/loopback.pm @@ -2,7 +2,7 @@ package LWP::Protocol::loopback; use strict; -our $VERSION = '6.46'; +our $VERSION = '6.47'; require HTTP::Response; diff --git a/lib/LWP/Protocol/mailto.pm b/lib/LWP/Protocol/mailto.pm index af469a2..30bbd51 100644 --- a/lib/LWP/Protocol/mailto.pm +++ b/lib/LWP/Protocol/mailto.pm @@ -11,7 +11,7 @@ require HTTP::Status; use Carp; use strict; -our $VERSION = '6.46'; +our $VERSION = '6.47'; use base qw(LWP::Protocol); our $SENDMAIL; diff --git a/lib/LWP/Protocol/nntp.pm b/lib/LWP/Protocol/nntp.pm index 275c059..cbb87db 100644 --- a/lib/LWP/Protocol/nntp.pm +++ b/lib/LWP/Protocol/nntp.pm @@ -4,7 +4,7 @@ package LWP::Protocol::nntp; use base qw(LWP::Protocol); -our $VERSION = '6.46'; +our $VERSION = '6.47'; require HTTP::Response; require HTTP::Status; diff --git a/lib/LWP/Protocol/nogo.pm b/lib/LWP/Protocol/nogo.pm index 216d7de..da21628 100644 --- a/lib/LWP/Protocol/nogo.pm +++ b/lib/LWP/Protocol/nogo.pm @@ -7,7 +7,7 @@ package LWP::Protocol::nogo; use strict; -our $VERSION = '6.46'; +our $VERSION = '6.47'; require HTTP::Response; require HTTP::Status; diff --git a/lib/LWP/RobotUA.pm b/lib/LWP/RobotUA.pm index dc33b3e..12303d2 100644 --- a/lib/LWP/RobotUA.pm +++ b/lib/LWP/RobotUA.pm @@ -2,7 +2,7 @@ package LWP::RobotUA; use base qw(LWP::UserAgent); -our $VERSION = '6.46'; +our $VERSION = '6.47'; require WWW::RobotRules; require HTTP::Request; diff --git a/lib/LWP/Simple.pm b/lib/LWP/Simple.pm index 7cc9ef2..1dc0aef 100644 --- a/lib/LWP/Simple.pm +++ b/lib/LWP/Simple.pm @@ -2,7 +2,7 @@ package LWP::Simple; use strict; -our $VERSION = '6.46'; +our $VERSION = '6.47'; require Exporter; diff --git a/lib/LWP/UserAgent.pm b/lib/LWP/UserAgent.pm index d35f790..d5e4b33 100644 --- a/lib/LWP/UserAgent.pm +++ b/lib/LWP/UserAgent.pm @@ -15,7 +15,7 @@ use LWP::Protocol (); use Scalar::Util qw(blessed); use Try::Tiny qw(try catch); -our $VERSION = '6.46'; +our $VERSION = '6.47'; sub new { @@ -783,7 +783,10 @@ sub cookie_jar { } $self->{cookie_jar} = $jar; $self->set_my_handler("request_prepare", - $jar ? sub { $jar->add_cookie_header($_[0]); } : undef, + $jar ? sub { + return if $_[0]->header("Cookie"); + $jar->add_cookie_header($_[0]); + } : undef, ); $self->set_my_handler("response_done", $jar ? sub { $jar->extract_cookies($_[0]); } : undef, diff --git a/t/local/http.t b/t/local/http.t index 0700d8e..a942639 100644 --- a/t/local/http.t +++ b/t/local/http.t @@ -5,6 +5,7 @@ use Test::Fatal; use Config; use FindBin qw($Bin); +use HTTP::Cookies (); use HTTP::Daemon; use HTTP::Request; use IO::Socket; @@ -63,7 +64,7 @@ sub _test { return plan skip_all => 'We could not talk to our daemon' unless $DAEMON; return plan skip_all => 'No base URI' unless $base; - plan tests => 127; + plan tests => 130; my $ua = LWP::UserAgent->new; $ua->agent("Mozilla/0.01 " . $ua->agent); @@ -414,6 +415,20 @@ sub _test { $ua->max_size(undef); like($res->as_string, qr/Client-Aborted: max_size/, 'partial: aborted'); # Client-Aborted is returned when max_size is given } + { + my $jar = HTTP::Cookies->new; + $jar->set_cookie( 1.1, "who", "cookie_man", "/", $base->host ); + $ua->cookie_jar($jar); + my $req = HTTP::Request->new( GET => url("/echo", $base) ); + my $res = $ua->request( $req ); + # Must have cookie + ok($res->is_success); + ok($res->decoded_content =~ /Cookie:[^\n]+who\s*=\s*cookie_man/, "request had cookie header" ) + or diag( $res->decoded_content ); + $res = $ua->request( $req ); + # Must have only one cookie + is( scalar( () = $res->decoded_content =~ /who\s*=\s*cookie_man/g ), 1, "request had only one cookie header" ) + } { # terminate server my $req = HTTP::Request->new(GET => url("/quit", $base)); my $res = $ua->request($req); diff --git a/xt/release/changes_has_content.t b/xt/release/changes_has_content.t index 1e5b3cb..bc1b2a2 100644 --- a/xt/release/changes_has_content.t +++ b/xt/release/changes_has_content.t @@ -8,7 +8,7 @@ if (($ENV{TRAVIS_PULL_REQUEST} || '') eq 'false') { note 'Checking Changes'; my $changes_file = 'Changes'; -my $newver = '6.46'; +my $newver = '6.47'; my $trial_token = '-TRIAL'; my $encoding = 'UTF-8'; -- 2.34.1