Skip to content
Myr

Merge pull request #2721 from Lukasa/no_proxy_fix

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

Ignore empty fields in no_proxy env var

authored by Cory Benfield · committed by Cory Benfield · parents f6afa71, b6127ca · Browse files · 1 file+3 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+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:requests/utils.py+3 added-1 removed
497 unmodified lines
498499 if no_proxy:500 # We need to check whether we match here. We need to see if we match501 # the end of the netloc, both with and without the port.502 no_proxy = no_proxy.replace(' ', '').split(',')502 no_proxy = (503 host for host in no_proxy.replace(' ', '').split(',') if host504 )505506 ip = netloc.split(':')[0]507 if is_ipv4_address(ip):508 for proxy_ip in no_proxy:
214 unmodified lines