Skip to content

net/http: support custom status text in server #8990

Closed
@DanielMorsing

Description

@DanielMorsing
Right now, there's no way to use a custom status text when using the net/http server.
This is mostly a problem when proxying requests for other servers.

While conforming programs are only supposed to look at the error code, we occasionally
see people caring about the text.

APIs have a tendency to define new status codes all the time and there's no way that
http.StatusText can keep up with these. This is a problem since some APIs don't properly
document the codes that they haphazardly define, so a programmer can only rely on the
status text for figuring out what exactly went wrong.

Other examples of weird status texts seen in the wild include links to job pages and
this thing https://github.com/joho/7XX-rfc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions