Skip to content

net/http: ParseHTTPVersion does not parse versions without a minor subversion #48766

Closed as not planned
@forgedhallpass

Description

@forgedhallpass

Quote from: src/net/http/request.go#ParseHTTPVersion

Note that strings without
// a minor version, such as "HTTP/2", are not valid.

What version of Go are you using (go version)?

$ go version
1.17

Does this issue reproduce with the latest release?

Yes

What did you expect to see?

ParseHTTPVersion("HTTP/2") -> 2, 0, true

What did you see instead?

ParseHTTPVersion("HTTP/2") -> 0, 0, false

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions