FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

SimpleHTTPRequestHandler incorrectly handles trailing escaped slash · Issue #134098 · python/cpython · GitHub

Repository navigation

SimpleHTTPRequestHandler incorrectly handles trailing escaped slash #134098

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).

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    3.13only security fixes
    3.14bugs and security fixes
    3.15bugs and security fixes
    on May 16, 2025
  2. serhiy-storchaka commented on May 16, 2025

    MemberAuthor

    Other effect of this bug -- a percent-encoded trailing slash is ignored after non-directory path (should return status NOT_FOUND).

  3. added a commit that references this issue on May 16, 2025
  4. added
    stdlibStandard Library Python modules in the Lib/ directory
    on May 16, 2025
  5. donbarbos commented on May 17, 2025

    Contributor

    since you mentioned request handling, what do you think about making http.server accept "absolute form" as "request target"?
    issue #132741

  6. added a commit that references this issue on May 17, 2025
  7. added 2 commits that reference this issue on May 17, 2025
  8. added 2 commits that reference this issue on May 17, 2025
  9. added a commit that references this issue on Jul 12, 2025
  10. added a commit that references this issue on Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

3.13only security fixes3.14bugs and security fixes3.15bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL