Skip to content
Myr

consider plain ip notation of an ip in no_proxy if not in cidr notation

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

authored by Kumar Varadarajulu · committed by Kumar Varadarajulu · parent 4865f0f · Browse files · 1 file+4 added−0 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+4 added−0 removed

  • other:+4 added−0 removed

1 file+4 added−0 removed

modified:requests/utils.py+4 added
537 unmodified lines
538 for proxy_ip in no_proxy:539 if is_valid_cidr(proxy_ip):540 if address_in_network(ip, proxy_ip):541 return True542 elif ip == proxy_ip:543 # If no_proxy ip was defined in plain IP notation instead of cidr notation &544 # matches the IP of the index545 return True546 else:547 for host in no_proxy:548 if netloc.endswith(host) or netloc.split(':')[0].endswith(host):549 # The URL does match something in no_proxy, so we don't want
183 unmodified lines