]> Cypherpunks repositories - gostls13.git/commitdiff
net/http/httputil: remove redundant pw.Close() call in DumpRequestOut
author1911860538 <alxps1911@gmail.com>
Fri, 15 Aug 2025 11:38:57 +0000 (11:38 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 28 Aug 2025 23:10:19 +0000 (16:10 -0700)
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 <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Auto-Submit: Sean Liao <sean@liao.dev>

src/net/http/httputil/dump.go

index 2edb9bc98d3bc859d0d64f33097d941c3c5f5d7a..23918e2ad4bbd5a78db2d045f773a7238491a7ef 100644 (file)
@@ -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