urllib2 : https and proxy

O.R.Senthil Kumaran orsenthil at users.sourceforge.net
Sun Jul 1 23:04:30 EDT 2007


* Maric Michaud <maric at aristote.info> [2007-06-28 23:38:39]:

>  Hmmm, i've tried something similar but I get the same result.
> 
>  For the code example I gave, I've put correctly the http_proxy and 
>  https_proxy environment variables, the default ProxyHandler get them right 
>  as this is the proxy itself which returns the error. I checked this with 
>  wireshark, the proxy said that there is incompatibilities in some request 
>  methods, like POST, with some protocols, Gopher is the example it gave.
>  That doesn't make much sense to me as the wget command I tried is intended 
>  to do exactly the same thing (POST over https and retrieve some cookies from 
>  the response), and go through with no problems.
> 

Maric, in the ActiveState urllib2 HOWTO which seems to apply for Python 2.5, I
came across a point which mentions urllib2 does not support PROXY for HTTPS.
Your case seems the same, I would suggest you to look up the Python Tracker
for any already open issues, or if not kindly log one yourself. 
I shall if I can help further, working on urllib2 is a project am doing as
part of Summer of Code 2007.

Thanks,

-- 
O.R.Senthil Kumaran
http://uthcode.sarovar.org



More information about the Python-list mailing list