]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-126766: `url2pathname()`: handle 'localhost' authority (#127129)
authorBarney Gale <barney.gale@gmail.com>
Fri, 22 Nov 2024 03:17:06 +0000 (03:17 +0000)
committerGitHub <noreply@github.com>
Fri, 22 Nov 2024 03:17:06 +0000 (03:17 +0000)
commitebf564a1d3e2e81b9846535114e481d6096443d2
tree62a0618bdaca77bde5822e9c0902851872174cb9
parentfcfdb55465636afc256bc29781b283404d88e6ca
GH-126766: `url2pathname()`: handle 'localhost' authority (#127129)

Discard any 'localhost' authority from the beginning of a `file:` URI. As a
result, file URIs like `//localhost/etc/hosts` are correctly decoded as
`/etc/hosts`.
Lib/nturl2path.py
Lib/test/test_urllib.py
Lib/urllib/request.py
Misc/NEWS.d/next/Library/2024-11-22-02-31-55.gh-issue-126766.jfkhBH.rst [new file with mode: 0644]