Subject: | Support CONNECT method for proxying |
please add support for the CONNECT method. LWP::Protocol::http does have
support for this as displayed in this snippet:
if (defined $proxy) {
# $proxy is an URL to an HTTP server which will proxy this request
$host = $proxy->host;
$port = $proxy->port;
$fullpath = $method eq "CONNECT" ?
($url->host . ":" . $url->port) :
$url->as_string;
}
basically, it's just using host:port instead of the entire url, like so:
CONNECT 1.2.3.4:8080 HTTP/1.0
and then stashes the socket so data can be sent directly to it