Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canonical form of 'ETag' header is incorrect #18476

Closed
rickb777 opened this issue Dec 30, 2016 · 1 comment
Closed

Canonical form of 'ETag' header is incorrect #18476

rickb777 opened this issue Dec 30, 2016 · 1 comment

Comments

@rickb777
Copy link

rickb777 commented Dec 30, 2016

Please answer these questions before submitting your issue. Thanks!

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

1.7.4

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

GOARCH="amd64"
GOOS="linux"

What did you do?

This was found by code inspection.

The 'ETag' header's canonical form has a capital 'T' (https://tools.ietf.org/html/rfc7232#section-2.3).

But the Go apis use lowercase 't' in 'Etag' instead.

This is in

  • net/http/fs.go:300 - literal string
  • net/textproto/reader.go:562 - CanonicalMIMEHeaderKey doesn't handle this case.

Consequence

No adverse effects of this have been observed. It's impact will be limited to rare cross-compatibility problems with other systems that don't correctly handle canonicalisation and/or case-insensitivity of header keys.

@bradfitz
Copy link
Contributor

We don't intend to change this. It would be too many special cases everywhere for something that's already working correctly and would only exist to encourage other's broken implementations.

And in http2, you can't send capital letters on the wire anyway, so this is even more irrelevant with modern HTTP.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants