diff --git a/src/net/http/header.go b/src/net/http/header.go index 832169247f..622ad28963 100644 --- a/src/net/http/header.go +++ b/src/net/http/header.go @@ -156,6 +156,7 @@ func (h Header) WriteSubset(w io.Writer, exclude map[string]bool) error { v = textproto.TrimString(v) for _, s := range []string{kv.key, ": ", v, "\r\n"} { if _, err := ws.WriteString(s); err != nil { + headerSorterPool.Put(sorter) return err } }