Message92538
I discovered recently that urllib2 doesn't respect the "no_proxy"
environment variable on linux (and on other platforms too, I think).
Here is an example of the problem :
- Set http_proxy and no_proxy environment variables (for instance
no_proxy="localhost")
proxy_handler = urllib2.ProxyHandler()
opener = urllib2.build_opener(proxy_handler)
urllib2.install_opener(opener)
and then open an "outside" url : everything is OK (urllib2 reads
correctly http_proxy), but for "localhost", it tries to open it
through the proxy.
You would expect urllib2 to understand no_proxy, all the more since
all the needed code is already available in urllib.
I have prepared a patch for urllib2 which does correct that bug.
I don't have other versions of python installed, so I couldn't check
that se bug is still present there. |
|
Date |
User |
Action |
Args |
2009-09-12 10:12:29 | xelnor | set | recipients:
+ xelnor |
2009-09-12 10:12:29 | xelnor | set | messageid: <1252750349.64.0.743075601539.issue6894@psf.upfronthosting.co.za> |
2009-09-12 10:12:27 | xelnor | link | issue6894 messages |
2009-09-12 10:12:27 | xelnor | create | |
|