Skip to content
Myr

Merge pull request #1845 from Lukasa/proxy_bypass

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Resolve proxy_bypass problems.

authored by Kenneth Reitz · committed by Kenneth Reitz · parents a855ba8, e2a36dd · Browse files · 1 file+10 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−1 removed

  • other:+10 added−1 removed

1 file+10 added−1 removed

modified:requests/utils.py+10 added-1 removed
485 unmodified lines
486 return {}487488 # If the system proxy settings indicate that this URL should be bypassed,489 # don't proxy.490 if proxy_bypass(netloc):490 # The proxy_bypass function is incredibly buggy on OS X in early versions491 # of Python 2.6, so allow this call to fail. Only catch the specific492 # exceptions we've seen, though: this call failing in other ways can reveal493 # legitimate problems.494 try:495 bypass = proxy_bypass(netloc)496 except (TypeError, socket.gaierror):497 bypass = False498499 if bypass:500 return {}501502 # If we get here, we either didn't have no_proxy set or we're not going503 # anywhere that no_proxy applies to, and the system settings don't require
149 unmodified lines