aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql
diff options
context:
space:
mode:
authorNicholas S. Husin <nsh@golang.org>2025-11-14 16:11:23 -0500
committerNicholas Husin <nsh@golang.org>2025-11-14 13:32:00 -0800
commitcb0d9980f5721715ebb73dd2e580eaa11c2ddee2 (patch)
tree8ab896c3938b34ec18d086bc2afcd5af10cf5dd3 /src/database/sql
parent03ed43988ff7f7671094d8c455532de7f2242e70 (diff)
downloadgo-cb0d9980f5721715ebb73dd2e580eaa11c2ddee2.tar.xz
net/http: do not discard body content when closing it within request handlers
(*body).Close() internally tries to discard the content of a request body up to 256 KB. We rely on this behavior to allow connection re-use, by calling (*body).Close() when our request handler exits. Unfortunately, this causes an unfortunate side-effect where we would prematurely try to discard a body content when (*body).Close() is called from within a request handler. There should not be a good reason for (*body).Close() to do this when called from within a request handler. As such, this CL modifies (*body).Close() to not discard body contents when called from within a request handler. Note that when a request handler exits, it will still try to discard the body content for connection re-use. For #75933 Change-Id: I71d2431a540579184066dd35d3da49d6c85c3daf Reviewed-on: https://go-review.googlesource.com/c/go/+/720380 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Nicholas Husin <husin@google.com> Reviewed-by: Damien Neil <dneil@google.com>
Diffstat (limited to 'src/database/sql')
0 files changed, 0 insertions, 0 deletions