Skip to content

Remove CanonicalMIMEHeaderKey() #19

@washanhanzi

Description

@washanhanzi

I think we can remove this line:

header = textproto.CanonicalMIMEHeaderKey(header)

The net/http/header.go already convert this for us:

// Values returns all values associated with the given key.
// It is case insensitive; textproto.CanonicalMIMEHeaderKey is
// used to canonicalize the provided key. To use non-canonical
// keys, access the map directly.
// The returned slice is not a copy.
func (h Header) Values(key string) []string {
	return textproto.MIMEHeader(h).Values(key)
}

https://pkg.go.dev/net/http#Header.Values

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions