[go] net/http: consolidate multipart form temp file cleanup for all HTTP versions

0 views
Skip to first unread message

Nicholas Husin (Gerrit)

unread,
Aug 10, 2026, 6:41:41 PM (11 hours ago) Aug 10
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Nicholas Husin, Damien Neil, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com

Nicholas Husin submitted the change

Change information

Commit message:
net/http: consolidate multipart form temp file cleanup for all HTTP versions

Historically, we have let each HTTP implementation handle its own
cleanup for any temporary files that might have been created when
handling multipart forms. Now that HTTP/2 has been moved to std, we
might as well consolidate these, and let net/http handle the cleanup
for HTTP/1, HTTP/2, and HTTP/3.

Also re-enable TestParseFormCleanup that was skipped for HTTP/2, and was
silently broken again due to the HTTP/2 bridging creating a new request,
causing the original HTTP/2 cleanup to not work.

For #70914
Change-Id: I2f23a9a0d02667730b1881fa541536846a6a6964
Reviewed-by: Damien Neil <dn...@google.com>
Reviewed-by: Nicholas Husin <hu...@google.com>
Files:
  • M src/net/http/http2.go
  • M src/net/http/internal/http2/api.go
  • M src/net/http/internal/http2/server.go
  • M src/net/http/serve_test.go
  • M src/net/http/server.go
Change size: S
Delta: 5 files changed, 5 insertions(+), 15 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I2f23a9a0d02667730b1881fa541536846a6a6964
Gerrit-Change-Number: 812820
Gerrit-PatchSet: 2
Gerrit-Owner: Nicholas Husin <n...@golang.org>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Nicholas Husin <hu...@google.com>
Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages