mirror of https://github.com/golang/go.git
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>
This commit is contained in:
parent
8405cd3005
commit
a570fcf74b
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue