[New-bugs-announce] [issue26864] urllib.request no_proxy check differs from curl

Daniel Morrison report at bugs.python.org
Tue Apr 26 10:43:47 EDT 2016

New submission from Daniel Morrison:

The no_proxy environment variable works in python as a case
sensitive suffix check.

Curl handles this variable as a case insensitive hostname check.

Case sensitivity appears to be in conflict with the DNS Case
Insensitivity RFC (https://tools.ietf.org/html/rfc4343).

While the suffix check is documented
(https://docs.python.org/3/library/urllib.request.html), this
seems to be problematic and inconsistent with other tools on the

I believe the ideal solution would be to have proxy_bypass be a
method of ProxyHandler so that it can be overridden without
dependence on undocumented methods. This would also allow
for the requested behavior to be added without breaking backwards

components: Library (Lib)
messages: 264297
nosy: Daniel Morrison
priority: normal
severity: normal
status: open
title: urllib.request no_proxy check differs from curl
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list