From: 1911860538 Date: Fri, 15 Aug 2025 11:38:57 +0000 (+0000) Subject: net/http/httputil: remove redundant pw.Close() call in DumpRequestOut X-Git-Tag: go1.26rc1~1003 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f74ed44ed9be1708d4561e0fa667792ff2707c14;p=gostls13.git net/http/httputil: remove redundant pw.Close() call in DumpRequestOut pw.Close() is already deferred earlier in DumpRequestOut. Change-Id: Icdc9366c816848ed0bb444022d2aa14e4ceaabac GitHub-Last-Rev: 7c38f9f2b6a9535a9262c2c40c8f1f8754eba972 GitHub-Pull-Request: golang/go#75029 Reviewed-on: https://go-review.googlesource.com/c/go/+/696415 Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI Reviewed-by: Damien Neil Reviewed-by: Sean Liao Auto-Submit: Sean Liao --- diff --git a/src/net/http/httputil/dump.go b/src/net/http/httputil/dump.go index 2edb9bc98d..23918e2ad4 100644 --- a/src/net/http/httputil/dump.go +++ b/src/net/http/httputil/dump.go @@ -147,7 +147,6 @@ func DumpRequestOut(req *http.Request, body bool) ([]byte, error) { req.Body = save if err != nil { - pw.Close() dr.err = err close(quitReadCh) return nil, err