On Tue, Mar 23, 2010 at 10:43, Philippe Bruhat (BooK) <[email protected]> wrote:
> ---
>  lib/LWP/UserAgent.pm |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/lib/LWP/UserAgent.pm b/lib/LWP/UserAgent.pm
> index a54782c..7757126 100644
> --- a/lib/LWP/UserAgent.pm
> +++ b/lib/LWP/UserAgent.pm
> @@ -572,6 +572,7 @@ sub get_basic_credentials
>  {
>     my($self, $realm, $uri, $proxy) = @_;
>     return if $proxy;
> +    return $uri->userinfo if $uri->can('userinfo') && $uri->userinfo;
>     return $self->credentials($uri->host_port, $realm);
>  }

The $uri->userinfo doesn't have the same return value signature as
$ua->get_basic_credentials so I can't see how this would work.  Do you
claim that this works for you?

LWP::Protocol::http already try to deal with embedded userinfo in its
_fixup_header method.

--Gisle

Reply via email to