commit | f73e4c9ed3b7ebdd5f699a16a880c2b1994e50dd | [log] [tgz] |
---|---|---|
author | Filippo Valsorda <filippo@golang.org> | Mon May 07 20:58:03 2018 -0400 |
committer | Brad Fitzpatrick <bradfitz@golang.org> | Wed May 09 00:22:18 2018 +0000 |
tree | d00cd5c454b9668b447111c488272a4a94551254 | |
parent | 3a7846fea0afe8cc88deb31d8cfb1fa15a3615ef [diff] |
http2: add X-Content-Type-Options automatically to prevent sniffing When a Content-Type that triggers content sniffing in old (but still in significant use) browsers is sent, add the X-Content-Type-Options: nosniff header, unless explicitly disabled. Expose httpguts.SniffedContentType for use in the HTTP 1 implementation. Will be tested by net/http.TestNoSniffHeader_h2. Updates golang/go#24513 Change-Id: Id1ffea867a496393cb52c5a9f45af97d4b2fcf12 Reviewed-on: https://go-review.googlesource.com/112015 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This repository holds supplementary Go networking libraries.
The easiest way to install is to run go get -u golang.org/x/net
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/net
.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html. The main issue tracker for the net repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/net:” in the subject line, so it is easy to find.