Closed
Description
Bug report
For path to directory which does not end with slash ("/"), SimpleHTTPRequestHandler returns status MOVED_PERMANENTLY with redirection to new path that ends with slash. Slashes can be percent-encoded, although this is not necessary. But the code that checks for the trailing slash does not take this into account (in two place).
Activity
serhiy-storchaka commentedon May 16, 2025
Other effect of this bug -- a percent-encoded trailing slash is ignored after non-directory path (should return status NOT_FOUND).
pythongh-134098: Fix handling %-encoded trailing slash in SimpleHTTPR…
donBarbos commentedon May 17, 2025
since you mentioned request handling, what do you think about making
http.server
accept "absolute form" as "request target"?issue #132741
gh-134098: Fix handling %-encoded trailing slash in SimpleHTTPRequest…
pythongh-134098: Fix handling %-encoded trailing slash in SimpleHTTPR…
4 remaining items