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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.18-567-1383343976-1562.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 860
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
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-567-1383343976-1562.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-567-1383343976-1562.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-21761-1383757571-668.89968-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 89
For context see also https://rt.cpan.org/Ticket/Display.html?id=89775 -- Paul Evans
X-RT-Interface: REST
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
RT-Message-ID: <rt-4.0.18-11453-1490921764-511.89968-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 82


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.