Subject: | Mechanize-1.02 HTTPS_PROXY problem |
Distribution: Mechanize-1.02
Perl version 5.6.1 or 5.8
OS: Windows XP, Solaris 8, Linux 86 2.4.22
The problem appears when I try to use Mechanize-1.02
with Crypt-SSLeay-0.51. As you probably know
Crypt-SSLeay is using environment variables:
HTTPS_PROXY, HTTPS_PROXY_USERNAME, and
HTTPS_PROXY_PASSWORD.
However these variables are overridden somehow by
LPW::proxy_env function, which is called from
Mechanize::new constructor.
If you setup the variables before Mechanize::new call
then LPW will try to talk to proxy directly & you'll
get "Not Implemented" response from the proxy. If you
initialize env. variables after Mechanize::new call then everything works fine.
You can reproduce it easily with lpw-ssl-test script,
which comes with Crypt-SSLeay-0.51 pack, just
replace LPW::UserAgent with WWW::Mechanize to
see the problem. Also make shure that you talk https to the proxy & web server.
I think LPW::proxy_env call should be removed from
Mechanize::new implementation.