diff options
| author | empijei <robclap8@gmail.com> | 2019-10-16 06:56:10 +0200 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2019-11-01 14:48:28 +0000 |
| commit | a570fcf74bdf652f453ed5dc0d8a41b15f1af8de (patch) | |
| tree | 19505ed6361df504f9130f9e0b12caa9536dfb3d /src | |
| parent | 8405cd3005a5274e80e41676146629c4086b6380 (diff) | |
| download | go-a570fcf74bdf652f453ed5dc0d8a41b15f1af8de.tar.xz | |
net/http: clarify Header.WriteSubset behavior
The current implementation performs a plain map lookup,
but other header methods canonicalize header keys before
using them.
Fixes #34918
Change-Id: Id4120488b8b39ecee97fa7a6ad8a34158687ffcd
Reviewed-on: https://go-review.googlesource.com/c/go/+/201357
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/net/http/header.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/net/http/header.go b/src/net/http/header.go index 4a4ebbcf2f..b9b53911f3 100644 --- a/src/net/http/header.go +++ b/src/net/http/header.go @@ -178,6 +178,7 @@ func (h Header) sortedKeyValues(exclude map[string]bool) (kvs []keyValues, hs *h // WriteSubset writes a header in wire format. // If exclude is not nil, keys where exclude[key] == true are not written. +// Keys are not canonicalized before checking the exclude map. func (h Header) WriteSubset(w io.Writer, exclude map[string]bool) error { return h.writeSubset(w, exclude, nil) } |
