Subject: | [PATCH] Fails with HTTPS_PROXY env var set |
LWP::Protocol::https version 6.07.
LWP’s env_proxy appears to prefer HTTPS_PROXY to https_proxy, so t/https_proxy.t’s https_proxy env var setting gets ignored:
t/https_proxy.t .. 1/56 unexpected response: HTTP/1.1 403 Forbidden
Connection: close
Date: Tue, 31 Oct 2017 05:07:44 GMT
Server: HTTP::Proxy/0.304
Content-Type: text/html
Client-Date: Tue, 31 Oct 2017 05:07:44 GMT
Client-Peer: 10.10.10.2:8080
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
...
The attached patch fixes it for me.
Subject: | open_x3294L8N.txt |
diff -rup LWP-Protocol-https-6.07-1/t/https_proxy.t LWP-Protocol-https-6.07-0/t/https_proxy.t
--- LWP-Protocol-https-6.07-1/t/https_proxy.t 2016-06-30 03:43:17.000000000 -0700
+++ LWP-Protocol-https-6.07-0/t/https_proxy.t 2017-10-30 22:13:29.000000000 -0700
@@ -85,6 +85,7 @@ $ua{proxy_nokeepalive} = LWP::UserAgent-
SSL_ca_file => $cafile
}
);
+$ENV{HTTP_PROXY} = $ENV{HTTPS_PROXY} =
$ENV{http_proxy} = $ENV{https_proxy} = "http://foo:bar\@$saddr[0]";
$ua{proxy}->env_proxy;
$ua{proxy_nokeepalive}->env_proxy;