urllib2 : https and proxy

O.R.Senthil Kumaran orsenthil at users.sourceforge.net
Mon Jul 2 05:04:30 CEST 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.


O.R.Senthil Kumaran

More information about the Python-list mailing list