proxy_bypass_registry in urllib.py does not handle the ProxyOverride registry value properly: it treats an empty override as *, i.e. bypass the proxy for all hosts. This behavior does not match other programs (e.g. Chrome) and can be easily obtained by specify * for the override. One fix would be to ignore empty tests, for example:
....
for test in proxyOverride:
if test:
if test == '<local>':
...
return 0
....
Perhaps whitespace should be stripped as well.
The problem arises because fiddler2 leaves a trailing ; on the ProxyOverride string.
One possible workaround is to set
urllib.proxy_bypass = lambda h: 0
to disable bypass checking. Another alternative would be to specify the proxy settings in the http_proxy environment variable (proxy_bypass_registry is not called in this case). |