Skip to content

net/http: handle headers with tokens better #3535

Closed
@niemeyer

Description

@niemeyer
The Connection and Expect headers are being poorly compared within the http package. The
RFC uses the notation 1#token for the value of these headers, which means
comma-separated with optional spacing. The http package does ad-hoc strings.Contains and
straight equality checks depending on the situation, which are both incorrect.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions