Skip to content

Commit d4a5b52

Browse files
[3.15] gh-56689 test case to cover for windows proxy_bypass misbehaving trailing ; entries on windows. (GH-160841) (#160844)
gh-56689 test case to cover for windows proxy_bypass misbehaving trailing ; entries on windows. (GH-160841) gh-56689 test case to cover for windows proxy_bypass misbehaving with trailing ; entries on windows. Issue was fixed in GH-115210 Co-Authored by Claude Code. (cherry picked from commit af44688) Co-authored-by: Senthil Kumaran <senthil@python.org>
1 parent a6616f2 commit d4a5b52

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎Lib/test/test_urllib2.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,14 @@ def test_winreg_proxy_bypass(self):
16251625
"expect <local> to bypass intranet address '%s'"
16261626
% host)
16271627

1628+
# empty entries (e.g. a trailing ';') must not match every host
1629+
for proxy_override in ("www.example.com;", ";", " ; ",
1630+
"www.example.com;;*.example.net"):
1631+
self.assertFalse(proxy_bypass("www.python.org", proxy_override),
1632+
"expected empty entry in %r not to bypass"
1633+
% proxy_override)
1634+
self.assertTrue(proxy_bypass("www.example.com", "www.example.com;"))
1635+
16281636
@unittest.skipUnless(sys.platform == 'darwin', "only relevant for OSX")
16291637
def test_osx_proxy_bypass(self):
16301638
bypass = {

0 commit comments

Comments
 (0)