Skip Menu |
 

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 65600
Status: new
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: tom [...] ritter.vg
Cc:
AdminCc:

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



Subject: LWP::UserAgent with proxy issues entire hostname in request
Download (untitled) / with headers
text/plain 1.3k
When communicating via SSL using a proxy, requests are issued of the form: GET https://example.com/ HTTP/1.1 Rather than: GET / HTTP/1.1 Requests made without SSL, or using a proxy over HTTP, are made with only /. This happens whether or not the env_proxy method is used. I tested using Burp proxy http://www.portswigger.net/burp/proxy.html, it shows the requests coming into the proxy with the entire hostname, and the server shows the request leaving the proxy (untampered) doing the same. Below is a script that can demonstrate 6 combinations: No Proxy | Proxy | Env Proxy -------------------------------- w/o SSL | / | / | w SSL | / | HN | HN #!/usr/bin/perl require LWP::UserAgent; my $ua = LWP::UserAgent->new; my $useproxy = 0; my $useenviroment = 0; my $usessl = 0; if($useproxy) { my $httpproxy = "localhost:8080"; my $proxyserver = ""; if($usessl) { if($useenviroment) { $ENV{HTTPS_PROXY} = "https://".$httpproxy; $ua->env_proxy(); } else { $proxyserver = "https://".$httpproxy; $ua->proxy(['http', 'https'], $proxyserver); } } else { $proxyserver = "http://".$httpproxy; $ua->proxy(['http', 'https'], $proxyserver); } } my $target = "https://server-you-can-tail-logs-for.com"; my $response = $ua->get($target); print $response->status_line; tested using: perl v5.10.1 under cygwin activestate perl


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.