commit | 4e5a313524da62600eb59dbf98624cfe946456f8 | [log] [tgz] |
---|---|---|
author | Emmanuel T Odeke <emmanuel@orijtech.com> | Tue Oct 20 04:11:12 2020 -0700 |
committer | Emmanuel Odeke <emm.odeke@gmail.com> | Wed Oct 21 23:05:41 2020 +0000 |
tree | a2a6a20a38b0cfd0245d5ba588d203faf64d3bac | |
parent | b2a8317b31d652b3ee293a313269b8290bcdf96c [diff] |
net/http: test that ParseMultipartForm catches overflows Tests that if the combination of: * HTTP multipart file payload size * ParseMultipartForm's maxMemory parameter * the internal leeway buffer size of 10MiB overflows, then we'll report an overflow instead of silently passing. Reapplies and fixes CL 254977, which was reverted in CL 263658. The prior test lacked a res.Body.Close(), so fixed that and added a leaked Transport check to verify correctness. Updates 40430. Change-Id: I3c0f7ef43d621f6eb00f07755f04f9f36c51f98f Reviewed-on: https://go-review.googlesource.com/c/go/+/263817 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> Trust: Damien Neil <dneil@google.com>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.