Subject: | Net::SSLGlue using a proxy does not set the HTTP<version> in the header |
Summary:
Net::SSLGlue does fix the problems with checking certificates, however
if I go through a proxy I can not POST information as there is no HTTP
version set in the header.
Detail:
Net::HTTP::Methods::http_configure() runs and I assume sets the
http_version.
When I go through a proxy this does not run, hence the http_version does
not get set. I assume Net::SSLGlue changes things.
The header sent when going through the proxy ends up being
POST /ncol/test/orderdirect.asp HTTP/
Note the missing 1.0 or 1.1 on the end of HTTP/
Line 200/207 in LWP::Protocol::http (version 5.826 and the latest 5.835)
there is this code
my $req_buf = $socket->format_request($method, $fullpath, @h);
#print "------\n$req_buf\n------\n";
If you remove the comment you can see the headers that have been created.
This fixes the problem
$req_buf =~ s|HTTP/|HTTP/1.0|; # When going through a proxy the HTTP
version is not set.
but is not exactly optimal :)
After looking through the code I'm not sure of an easy fix but perhaps
someone else can think of one?