diff options
author | Michael Felt <aixtools@users.noreply.github.com> | 2018-12-26 05:43:42 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2018-12-26 05:43:42 (GMT) |
commit | 2062a20641febad5eb9c18d74e1cfb4d7a6e53ed (patch) | |
tree | e1da7d77317cc4428315cacf26ed30a1f64d6d3f /Misc | |
parent | 22462da70c1ae015a60a7b821547bc6d2b5bc265 (diff) | |
download | cpython-2062a20641febad5eb9c18d74e1cfb4d7a6e53ed.zip cpython-2062a20641febad5eb9c18d74e1cfb4d7a6e53ed.tar.gz cpython-2062a20641febad5eb9c18d74e1cfb4d7a6e53ed.tar.bz2 |
bpo-34711: Return HTTPStatus.NOT_FOUND if path.endswith('/') and not a directory (GH-9687)
AIX allows a trailing slash on local file system paths, which isn't what we want
in http.server. Accordingly, check explicitly for this case in the server code,
rather than relying on the OS raising an exception.
Patch by Michael Felt.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2018-10-03-09-25-02.bpo-34711.HeOmKR.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-10-03-09-25-02.bpo-34711.HeOmKR.rst b/Misc/NEWS.d/next/Library/2018-10-03-09-25-02.bpo-34711.HeOmKR.rst new file mode 100644 index 0000000..f3522f3 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-10-03-09-25-02.bpo-34711.HeOmKR.rst @@ -0,0 +1,3 @@ +http.server ensures it reports HTTPStatus.NOT_FOUND when the local path ends with "/" +and is not a directory, even if the underlying OS (e.g. AIX) accepts such paths as a +valid file reference. Patch by Michael Felt. |