Skip to content

net/http: document that Header.Set canonicalizes the header key #27923

Closed
@githubsands

Description

@githubsands

Please answer these questions before submitting your issue. Thanks!

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

1.10.3

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

darwin, amd64

What did you do?

https://play.golang.org/p/l-3GJBY-vWA

What did you expect to see?

Expected key to be the same string HeyHey when adding it to the http header rather then Heyhey.

What did you see instead?

Saw that after adding or setting a string to a header it does not keep the n+1 capital letter causing a check for the same key to fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.help wanted

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions