... but cannot find anyone else complaining
Oh they're complaining all right - you just can't hear their muffled screams:)
I have a squid proxy, where CONNECT is enabled for authorized entities. The following maneuver works through this proxy... tell me if it works for you (one thing, you have no port specified for the proxy, this might matter):
my $finaldata;
my @protocols = qw(http https ftp);
my $query_url = 'https://www.etrade.com/';
my $ua = LWP::UserAgent->new( agent => 'yourstring');
$ua->protocols_allowed( \@protocols );
$ua->proxy('http://1.2.3.4:3128/');
my $response = $ua->get("$query_url",
':content_cb' => \&stitch,
);
sub stitch {
my($data, $response, $protocol) = @_;
print $data;
return $finaldata .= $data;
}
I am not a big fan of the LWP documentation.. it's not too clear in places ..
HTH
update,fix typo
| [reply] [d/l] |
That code does not go through the proxy server for the https request; it creates a direct request to https://www.etrade.com.
| [reply] |
Really? It went right through my proxy - here's the squid access log snippet from earlier tonight
1098222710.053 224973 1.2.3.4 TCP_MISS/200 1234 CONNECT www.etrade.com
+:443 - DIRECT/12.153.224.22 -
1098222710.055 225359 1.2.3.4 TCP_MISS/200 25854 CONNECT www.etrade.co
+m:443 - DIRECT/12.153.224.22 -
1.2.3.4 is my source IP.
I watched the requests go through at perl -e ' print scalar localtime(1098222710);'.. am I missing something? | [reply] [d/l] [select] |
| [reply] |