You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HTTP::Request + LWP::UserAgent pair of modules correctly handles the case
my $resp = $ua->request( GET "http://user:pass@host/path" );
but despite that the HTTP basic auth header is a property of the HTTP::Request itself, this appears to be being handled entirely by LWP rather than HTTP::Request.
It would be more useful for other HTTP useragents which are based on HTTP::Message objects if this were handled within HTTP::Request itself. I feel that therefore the behaviour ought to be somewhere that after
my $req = GET "http://user:pass@host/path";
We now have the Authorization header correctly set in $req and the user:pass@ removed from the embedded URL in the first request line. Ideally then at this point
print $req->as_string;
should yield
GET /path HTTP/1.1
Host: host
Authorization: Basic dXNlcjpwYXNz
...
--
Paul Evans
Migrated from rt.cpan.org#89968 (status was 'new')
Requestors:
From [email protected] on 2013-11-01 22:12:56:
From [email protected] on 2013-11-06 17:06:11:
The text was updated successfully, but these errors were encountered: