To the best of my knowledge, the 'proxy' that is used in LWP still cannot 
support CONNECT style SSL proxies, meaning its very hit or miss if it 
works - roughly 50/50 for the few hundred proxies ive checked recently.

try replacing *all* your $UA->proxy lines with

$ENV{HTTPS_PROXY} = "http://localhost:80";;

this will work assuming you have Crypt::SSLeay installed (libwwwperl works 
with either IO SOCKET SSL or crypt ssleay... but crypt ssleay is the one 
that gives you low level proxy stuff.)

check out the docs on crypt::ssleay for more info on using proxies with 
LWP, it was an eye opener.  

as a side note, you may want to undef $ENV{HTTPS_PROXY} before creating 
your agent.  I dont use UserAgent much but i use WWW::Mechanize a ton 
(sunbclass) and it has code to automagically set $ua->proxy if it detects 
the ENV is set.  which immediately breaks the ENV proxy since they are not 
compatible... boo Mechanize =).  I think that code is in Mechanize and not 
UserAgent however so you should be safe - but im not positive.

The only downsides to this approach:

 - UserAgent will report itself as not being proxied even though it is, 
since its done at a lower level than its aware.  for my code, i couldnt 
care less.
 - you have to https everything, since I havent found a way to use the 
env-set style https proxy for ssl, but something different for http.  you 
cant mix and match the LWP style and the Crypt::SSL style proxies - the 
lwp one will clobber whatever goodness is in crypt::ssleay's with stuff 
that doesnt work.

I have no clue why you are getting 403 errors in a browser...

-- 
gedanken



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to