Skip to content

Fix no_proxy being too greedy.#4812

Open
gilbsgilbs wants to merge 2 commits intopsf:mainfrom
gilbsgilbs:fix-greedy-no-proxy
Open

Fix no_proxy being too greedy.#4812
gilbsgilbs wants to merge 2 commits intopsf:mainfrom
gilbsgilbs:fix-greedy-no-proxy

Conversation

@gilbsgilbs
Copy link

@gilbsgilbs gilbsgilbs commented Oct 1, 2018

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 gilbsgilbs force-pushed the fix-greedy-no-proxy branch from 66c4e52 to 26440bc Compare October 1, 2018 16:18
@gilbsgilbs
Copy link
Author

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 gilbsgilbs force-pushed the fix-greedy-no-proxy branch 2 times, most recently from 180b572 to 7173fe3 Compare October 1, 2018 17:33
@gilbsgilbs gilbsgilbs force-pushed the fix-greedy-no-proxy branch from 6b30067 to 72c574c Compare October 1, 2018 18:39
@nateprewitt nateprewitt changed the base branch from master to main January 3, 2022 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

no_proxy implementation is too greedy

2 participants