Re: urllib2 : https and proxy
- From: cp.finances.gouv@xxxxxxxxx
- Date: Mon, 02 Jul 2007 02:32:08 -0700
On 2 juil, 05:04, "O.R.Senthil Kumaran"
<orsent...@xxxxxxxxxxxxxxxxxxxxx> wrote:
* Maric Michaud <m...@xxxxxxxxxxxxx> [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.
Yes, I realize this too, I think this should be considered as a bug in
the documentation.
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.
Didn't find one when i made a quick search, but i would suggest to
submit a documentation bug.
BTW, I find this recipe on python cookbook,
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/456195,
works fine for me (with the two additionals comments in my case). We
could add a pointer to this in the doc before fixing urllib2.
What would you suggest ?
--
O.R.Senthil Kumaranhttp://uthcode.sarovar.org
.
- Prev by Date: Re: howto resend args and kwargs to other func?
- Next by Date: ann: Python at the IET
- Previous by thread: Probably simple syntax error
- Next by thread: ann: Python at the IET
- Index(es):
Relevant Pages
|