Skip to content

net/http: Status shouldn't include StatusCode #38996

Closed
@kkroo

Description

@kkroo

In parsing: HTTP/1.1 200 OK

StatusCode is correctly set to 200 but Status is parsed to 200 OK when it should only be OK. This leads to inconsistency with http.StatusText which only returns OK instead of 200 OK

https://github.com/golang/go/blob/master/src/net/http/response.go#L176
https://github.com/golang/go/blob/master/src/net/http/status.go#L85

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Unfortunate

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions