diff options
author | Barney Gale <barney.gale@gmail.com> | 2024-11-14 20:22:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-14 20:22:14 (GMT) |
commit | cae9d9d20f61cdbde0765efa340b6b596c31b67f (patch) | |
tree | 72fd81537fbe2b3989fbaf3f952ad8c65da7d0f7 /Misc/NEWS.d/next/Library | |
parent | 47cbf038850852cdcbe7a404ed7c64542340d58a (diff) | |
download | cpython-cae9d9d20f61cdbde0765efa340b6b596c31b67f.zip cpython-cae9d9d20f61cdbde0765efa340b6b596c31b67f.tar.gz cpython-cae9d9d20f61cdbde0765efa340b6b596c31b67f.tar.bz2 |
GH-126766: `url2pathname()`: handle empty authority section. (#126767)
Discard two leading slashes from the beginning of a `file:` URI if they
introduce an empty authority section. As a result, file URIs like
`///etc/hosts` are correctly parsed as `/etc/hosts`.
Diffstat (limited to 'Misc/NEWS.d/next/Library')
-rw-r--r-- | Misc/NEWS.d/next/Library/2024-11-12-21-43-12.gh-issue-126766.oi2KJ7.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2024-11-12-21-43-12.gh-issue-126766.oi2KJ7.rst b/Misc/NEWS.d/next/Library/2024-11-12-21-43-12.gh-issue-126766.oi2KJ7.rst new file mode 100644 index 0000000..e393630 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-11-12-21-43-12.gh-issue-126766.oi2KJ7.rst @@ -0,0 +1,2 @@ +Fix issue where :func:`urllib.request.url2pathname` failed to discard two +leading slashes introducing an empty authority section. |