Skip to content

gh-132671: Do not match host+port with proxy bypass macOS rules, match host only. #132672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/urllib/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -1981,7 +1981,7 @@ def ip2num(ipAddr):
if (hostIP >> mask) == (base >> mask):
return True

elif fnmatch(host, value):
elif fnmatch(hostonly, value):
return True

return False
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix issue where system proxy bypass configuration doesn't work with URL with port part.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • We need some context about what module/function is actually being fixed.
  • "system proxy bypass configuration doesn't work" is a bit wordy.
Suggested change
Fix issue where system proxy bypass configuration doesn't work with URL with port part.
Fix proxy bypass on URLs with a port in :mod:`urllib.request`.

Loading