requests
requests copied to clipboard
Fix no_proxy being too greedy.
Summary: Setting no_proxy
on requests.com
used to enable it on somerequests.com
also, which was unexpected and potentially dangerous. (see #4795)
Note that this delegates to urllib more often, as stated here. I don't have the history behind should_bypass_proxies
implementation, therefore my change is the tiniest possible (minimum thing to fix the greedy behavior). I don't know exactly why requests tries some things first and then delegates to urllib though.
Fixes #4795
Apparently CPython 3.4 no_proxy
implementation was as naive as requests', hence the failing build. Not sure giving the final word to proxy_bypass
is a great idea. Can't we just use the same implementation as in CPython 3.7?