]> granicus.if.org Git - python/commit
bpo-34711: Return HTTPStatus.NOT_FOUND if path.endswith('/') and not a directory...
authorMichael Felt <aixtools@users.noreply.github.com>
Wed, 26 Dec 2018 05:43:42 +0000 (06:43 +0100)
committerNick Coghlan <ncoghlan@gmail.com>
Wed, 26 Dec 2018 05:43:42 +0000 (15:43 +1000)
commit2062a20641febad5eb9c18d74e1cfb4d7a6e53ed
treee1da7d77317cc4428315cacf26ed30a1f64d6d3f
parent22462da70c1ae015a60a7b821547bc6d2b5bc265
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.
Lib/http/server.py
Misc/NEWS.d/next/Library/2018-10-03-09-25-02.bpo-34711.HeOmKR.rst [new file with mode: 0644]