Skip Menu |
 

This queue is for tickets about the HTTP-Message CPAN distribution.

Report information
The Basics
Id: 89968
Status: resolved
Priority: 0/
Queue: HTTP-Message

People
Owner: Nobody in particular
Requestors: leonerd-cpan [...] leonerd.org.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 6.06
Fixed in: (no value)



Subject: Extraction of authorization from URL needs to happen sooner
Download (untitled) / with headers
text/plain 860b
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
For context see also https://rt.cpan.org/Ticket/Display.html?id=89775 -- Paul Evans


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.