requests icon indicating copy to clipboard operation
requests copied to clipboard

Fix no_proxy being too greedy.

Open gilbsgilbs opened this issue 6 years ago • 1 comments

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

gilbsgilbs avatar Oct 01 '18 15:10 gilbsgilbs

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?

gilbsgilbs avatar Oct 01 '18 16:10 gilbsgilbs