Imported Upstream version 6.47 upstream/6.47
authorDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 21 Jul 2022 02:28:26 +0000 (11:28 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 21 Jul 2022 02:28:26 +0000 (11:28 +0900)
29 files changed:
Changes
META.json
META.yml
Makefile.PL
lib/LWP.pm
lib/LWP/Authen/Basic.pm
lib/LWP/Authen/Digest.pm
lib/LWP/Authen/Ntlm.pm
lib/LWP/ConnCache.pm
lib/LWP/Debug.pm
lib/LWP/Debug/TraceHTTP.pm
lib/LWP/DebugFile.pm
lib/LWP/MemberMixin.pm
lib/LWP/Protocol.pm
lib/LWP/Protocol/cpan.pm
lib/LWP/Protocol/data.pm
lib/LWP/Protocol/file.pm
lib/LWP/Protocol/ftp.pm
lib/LWP/Protocol/gopher.pm
lib/LWP/Protocol/http.pm
lib/LWP/Protocol/loopback.pm
lib/LWP/Protocol/mailto.pm
lib/LWP/Protocol/nntp.pm
lib/LWP/Protocol/nogo.pm
lib/LWP/RobotUA.pm
lib/LWP/Simple.pm
lib/LWP/UserAgent.pm
t/local/http.t
xt/release/changes_has_content.t

diff --git a/Changes b/Changes
index 6a70da0ccddacf9c40b8323f53a0fb2aed5a1cdc..4a2ea070c2cadcf59191c30d355318538f1a5055 100644 (file)
--- 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)
index f1ed4163337fcf8f01958d0a5f27c3665cd10b30..b7867f2e2bbce293259ed60da6caa0be6e2cde35 100644 (file)
--- a/META.json
+++ b/META.json
    "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",
       "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" : [
          {
                   "meta_noindex" : 1
                },
                "Dist::Zilla::Role::ModuleMetadata" : {
-                  "Module::Metadata" : "1.000036",
-                  "version" : "0.006"
+                  "Module::Metadata" : "1.000037",
+                  "version" : "0.004"
                }
             },
             "name" : "MetaProvides::Package",
             "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",
             "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",
             "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",
                   "changelog" : "Changes"
                },
                "Dist::Zilla::Role::Git::Repo" : {
-                  "git_version" : "2.26.2",
+                  "git_version" : "2.28.0",
                   "repo_root" : "."
                }
             },
                   "changelog" : "Changes"
                },
                "Dist::Zilla::Role::Git::Repo" : {
-                  "git_version" : "2.26.2",
+                  "git_version" : "2.28.0",
                   "repo_root" : "."
                },
                "Dist::Zilla::Role::Git::StringFormatter" : {
                   "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" : {
                   "changelog" : "Changes"
                },
                "Dist::Zilla::Role::Git::Repo" : {
-                  "git_version" : "2.26.2",
+                  "git_version" : "2.28.0",
                   "repo_root" : "."
                },
                "Dist::Zilla::Role::Git::StringFormatter" : {
                   "remotes_must_exist" : 1
                },
                "Dist::Zilla::Role::Git::Repo" : {
-                  "git_version" : "2.26.2",
+                  "git_version" : "2.28.0",
                   "repo_root" : "."
                }
             },
       "Yury Zavarin <yury.zavarin@gmail.com>",
       "Zefram <zefram@fysh.org>"
    ],
-   "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"
 }
 
index b2b914aabff8e2d659f35346e6a4050816557e89..a416dbd8d9cfc7453a091f14a1d6899eb5bc2fed 100644 (file)
--- 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 <tech@askold.net>'
   - 'Yury Zavarin <yury.zavarin@gmail.com>'
   - 'Zefram <zefram@fysh.org>'
-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'
index 70518f91b65c658f3a2b80f6a8a1c2740f7768c8..38ac1d64112341d7724be8e95bff6201c174162b 100644 (file)
@@ -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"
   }
index 7a0768faa8de7d70d1bfb481efe4787ebc0ae44b..822be8be1a3403b17e9114bbb940052acea1fa8b 100644 (file)
@@ -1,6 +1,6 @@
 package LWP;
 
-our $VERSION = '6.46';
+our $VERSION = '6.47';
 
 require LWP::UserAgent;  # this should load everything you need
 
index 2f1b9a19bcfdba27dcd8892bd3bdf057f016213d..2beff04769fbabf0a9c9d4df37d9018c34192585 100644 (file)
@@ -2,7 +2,7 @@ package LWP::Authen::Basic;
 
 use strict;
 
-our $VERSION = '6.46';
+our $VERSION = '6.47';
 
 require Encode;
 require MIME::Base64;
index 9fe7449dfd11b8cae31df59799020fe2e0b4ab74..3430738bdb1497bd6e79d4937dc27274b41ddfe8 100644 (file)
@@ -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;
 
index e13c1b4634802d0a9277721afc97f7f3e3d9d649..1dce86a64c7262eeea337f88857619fbb70d9e70 100644 (file)
@@ -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";
index 5a6cda16576df16916868a0cad705884d907f7be..73d3ce8967a93f709f9320954acddbd18d7acec6 100644 (file)
@@ -2,7 +2,7 @@ package LWP::ConnCache;
 
 use strict;
 
-our $VERSION = '6.46';
+our $VERSION = '6.47';
 our $DEBUG;
 
 sub new {
index 9ff9cb4badd42777fdaf23b5707d4661e58174ff..c523e84c12065f06a62def24fddfe907f26b0390 100644 (file)
@@ -1,6 +1,6 @@
 package LWP::Debug;    # legacy
 
-our $VERSION = '6.46';
+our $VERSION = '6.47';
 
 require Exporter;
 our @ISA       = qw(Exporter);
index 3d9d7ae06d56f31eca6baa02fe59087c6b08ac13..fbf36636dbe058a18c9eb6e35e7e4bafe9eea4df 100644 (file)
@@ -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;
index 717a7b603b54cc5ca2c7d6fd3cef74ecdf32cf13..bf27e7042513935e91ec5efc5de11d75a34bac7b 100644 (file)
@@ -1,6 +1,6 @@
 package LWP::DebugFile;
 
-our $VERSION = '6.46';
+our $VERSION = '6.47';
 
 # legacy stub
 
index dc257d4aa0f9f3ad593b012611ecf3feabef05e4..0ac6cf1105810227a9a070da4d4b988bf3e8d162 100644 (file)
@@ -1,6 +1,6 @@
 package LWP::MemberMixin;
 
-our $VERSION = '6.46';
+our $VERSION = '6.47';
 
 sub _elem {
     my $self = shift;
index e78ef86349f9e904d9702ef2c8345857b3554db0..aeb0be10c1521a6a12266c632daae68c64a70ff7 100644 (file)
@@ -2,7 +2,7 @@ package LWP::Protocol;
 
 use base 'LWP::MemberMixin';
 
-our $VERSION = '6.46';
+our $VERSION = '6.47';
 
 use strict;
 use Carp ();
index 2a787d82d5bbacc4d26bdcd17034e040613b558d..2b32dc3aaeab7f2db5650136482a1d925c142e71 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 
 use base qw(LWP::Protocol);
 
-our $VERSION = '6.46';
+our $VERSION = '6.47';
 
 require URI;
 require HTTP::Status;
index 6b471d909a5a6bd6ad98a185bd44ff46b7fb4f4d..6c6faad4220c6e26c94374981437c28172d52738 100644 (file)
@@ -4,7 +4,7 @@ package LWP::Protocol::data;
 
 use strict;
 
-our $VERSION = '6.46';
+our $VERSION = '6.47';
 
 require HTTP::Response;
 require HTTP::Status;
index 44a5cb17629a2cb84f0117782a7f665d431cf009..673029f9d234134452b816afd529d0347e855d9b 100644 (file)
@@ -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;
index 0e2992dc807d7720138aee9dc260140bc13265f8..0e22f2c4fe0a8378d9d20ceabf8d2887a54b0549 100644 (file)
@@ -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    ();
index 2d217721b7f587319c1c5b3d13009dd8026fddf7..8a7f803b29ec971d5a721e91cce64ec652919d78 100644 (file)
@@ -9,7 +9,7 @@ package LWP::Protocol::gopher;
 
 use strict;
 
-our $VERSION = '6.46';
+our $VERSION = '6.47';
 
 require HTTP::Response;
 require HTTP::Status;
index 8108ffc76258ebe76be7b2f197ed16c92a8bf48b..89f7d2e16157c4df31b012d8cb1972db12ff3fd7 100644 (file)
@@ -2,7 +2,7 @@ package LWP::Protocol::http;
 
 use strict;
 
-our $VERSION = '6.46';
+our $VERSION = '6.47';
 
 require HTTP::Response;
 require HTTP::Status;
index 16b3a4885126e886330048553be40b01694faa31..8b4546fc79b758312f6470ed005618f55f3f16c8 100644 (file)
@@ -2,7 +2,7 @@ package LWP::Protocol::loopback;
 
 use strict;
 
-our $VERSION = '6.46';
+our $VERSION = '6.47';
 
 require HTTP::Response;
 
index af469a2377bb1805d95d098ad43c39f1c3cccebb..30bbd5125f230ce8a6824ebf20a44a8f908b77ea 100644 (file)
@@ -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;
index 275c05947594da4ed158a19b5e3843af7197fe8e..cbb87db27ac2e424264306fde66d2168cc559369 100644 (file)
@@ -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;
index 216d7de0aa3927d8763ca674e9b742e7b81105c5..da2162855f8649bed70e33ad37708e3d82022def 100644 (file)
@@ -7,7 +7,7 @@ package LWP::Protocol::nogo;
 
 use strict;
 
-our $VERSION = '6.46';
+our $VERSION = '6.47';
 
 require HTTP::Response;
 require HTTP::Status;
index dc33b3eb8c1f8c735722ddcb2a39edb7944ad404..12303d20b085ebe40b2ab429235097cc95d9eed7 100644 (file)
@@ -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;
index 7cc9ef2cb80325f48ba473ec9b0026c5eca76890..1dc0aef7451aa3b1e23cf87c3b4a2b4da3f2853c 100644 (file)
@@ -2,7 +2,7 @@ package LWP::Simple;
 
 use strict;
 
-our $VERSION = '6.46';
+our $VERSION = '6.47';
 
 require Exporter;
 
index d35f790a23be7bee1f1ee17bcacb843e4cee5b1c..d5e4b33f690b6343436eeae2b7c06f6959d2449f 100644 (file)
@@ -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,
index 0700d8e2cbf5176ac8d134ae33e9e13adeda57d9..a9426391beb0e2c5fda7d087f3197df36340c5e7 100644 (file)
@@ -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);
index 1e5b3cbee6f6120a51133e3fcc489ea9dc7b010a..bc1b2a2391b65428ef84bba9ec5aeb31da9d717c 100644 (file)
@@ -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';