Add a comment about lowercase env. variables precedence over uppercase

This commit is contained in:
Julien Prigent
2018-04-11 22:42:22 +00:00
committed by Nate Prewitt
parent 1e8a3142d2
commit 60a5a393d8
+2
View File
@@ -696,6 +696,8 @@ def should_bypass_proxies(url, no_proxy):
:rtype: bool
"""
# Prioritize lowercase environment variables over uppercase
# to keep a consistent behaviour with other http projects (curl, wget).
get_proxy = lambda k: os.environ.get(k) or os.environ.get(k.upper())
# First check whether no_proxy is defined. If it is, check that the URL