Issue 856047: urllib.py does not use "no_proxy"; (original) (raw)

Created on 2003-12-08 04:15 by abo, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python-orig.3-0.4.diff.gz abo,2003-12-08 04:27 patch against python 2.3.2 to add "no_proxy" support to urllib.py
Messages (6)
msg19299 - (view) Author: Donovan Baarda (abo) * Date: 2003-12-08 04:15
urllib.py uses "*_proxy" variables to identify proxies to use in the "getproxies()" function. However, it does not use the corresponding "no_proxy" variable in the "proxy_bypass()" method. This affects any platform that can use "*_proxy" environment variables to specify proxies. This includes win32, which will use environment variables before the registry if they are defined. On win32 this causes the confusing behaviour of using the registry for "proxy_bypass()" checking when "*_proxy" environment variables are used to identify the proxies. Attached is a patch against python-2.3.2 that adds support for "no_proxy". Note that win32 will correctly favor using "no_proxy" over using the registry if any "*_proxy" variables are defined.
msg19300 - (view) Author: Donovan Baarda (abo) * Date: 2003-12-08 04:27
Logged In: YES user_id=10273 Whups... failed to attach patch.
msg19301 - (view) Author: Enrico Scholz (ensc) Date: 2005-02-18 11:13
Logged In: YES user_id=10773 What is the state of this bug? Is something wrong with the patch that it was not applied yet? It is something annoying to unset $http_proxy manually for some programs.
msg19302 - (view) Author: Donovan Baarda (abo) * Date: 2005-02-19 05:21
Logged In: YES user_id=10273 This bug is still present in current versions of Python. The biggest problem with this patch is it only addresses urllib, when urllib2 has the same problem. I have been meaning to put together a new patch that fixes both urllib and urllib2, but haven't had time or external motivation yet.
msg19303 - (view) Author: Till Maas (tmaas) Date: 2007-05-08 20:15
So, it is two years later now, will this ever be fixed? Is there a way to disable to use of proxies completely without having to change the enviroment when http_proxy is set? It is a bad user experience, when one is only able to change a proxy but not to disable the use of proxies completely.
msg61275 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-01-20 12:05
Added docs and committed as r60134. Thanks for your patch!
History
Date User Action Args
2022-04-11 14:56:01 admin set github: 39676
2008-01-20 12:05:58 georg.brandl set status: open -> closednosy: + georg.brandlresolution: acceptedmessages: +
2003-12-08 04:15:05 abo create