[docs] [issue26864] urllib.request no_proxy check differs from curl

Daniel Morrison report at bugs.python.org
Tue Apr 26 11:55:08 EDT 2016


Daniel Morrison added the comment:

I believe there was a misunderstanding.

While the environment variable name is handled in a case
insensitive way, the contents of the environment variable is not.

Please see some examples below:

    >>> os.environ['no_proxy'] = 'example.com'
    >>> urllib.request.proxy_bypass('EXAMPLE.com')
    0
    >>> urllib.request.proxy_bypass('example.com')
    1

Also to clarify the meaning of suffix check:

    >>> os.environ['no_proxy'] = 'example.com'
    >>> urllib.request.proxy_bypass('myexample.com')
    1

My apologies for my lack of clarity.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26864>
_______________________________________


More information about the docs mailing list