diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-07 22:52:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-07 22:52:33 +0000 |
commit | 11c6e5fc65f26ba5219997d19707b998a9abf26d (patch) | |
tree | a1dc8073a679611d3f09c01eda006cc3f6f846b1 /Master/tlpkg/tlperl/site/lib/LWP/Authen/Basic.pm | |
parent | a6593bd4f2eb12ae25540de026f7f9ebcf230a2f (diff) |
tl20 perl 5.30.1 for Windows, from Siep
git-svn-id: svn://tug.org/texlive/trunk@54166 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/site/lib/LWP/Authen/Basic.pm')
-rw-r--r-- | Master/tlpkg/tlperl/site/lib/LWP/Authen/Basic.pm | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Authen/Basic.pm b/Master/tlpkg/tlperl/site/lib/LWP/Authen/Basic.pm index d33e4af2e40..513475f1a3c 100644 --- a/Master/tlpkg/tlperl/site/lib/LWP/Authen/Basic.pm +++ b/Master/tlpkg/tlperl/site/lib/LWP/Authen/Basic.pm @@ -2,7 +2,7 @@ package LWP::Authen::Basic; use strict; -our $VERSION = '6.37'; +our $VERSION = '6.43'; require MIME::Base64; @@ -11,6 +11,10 @@ sub auth_header { 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 @@ sub authenticate }); $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); } |