Skip to content

http.server does not accept "absolute-form" as "request-target" #132741

@GreenYun

Description

@GreenYun

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard 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