http.server does not accept "absolute-form" as "request-target"
Open
Nobody has claimed this yet.
stdlib
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 36k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
python3 -m http.server &
printf "GET http://127.0.0.1:8000/ HTTP/1.1\r\nHost: 127.0.0.1\r\n\r\n" | nc 127.0.0.1 8000
Expected: 200 OK
Got: 404 File not found
Reference:
[RFC 9112] (Section 3.2)
[RFC 7230] (Section 5.3)
[RFC 2616] (Section 5.1.2)
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the request with python3 -m http.server and nc from the issue, then trace the http.server request handling for an absolute-form request-target. Done means the shown request receives 200 OK instead of 404 File not found, consistent with the referenced RFC behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100