aboutsummaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2020-12-03 09:45:07 -0500
committerRuss Cox <rsc@golang.org>2020-12-03 16:05:09 +0000
commit5246fa5e75b129a7dbd9722aa4de0cbaf7ceae43 (patch)
treebe11a2973f650b9d46b2388f54731d44e72f92ec /src/net
parent07cba70d5794747044ce5f2f3b34de139193e2a5 (diff)
downloadgo-5246fa5e75b129a7dbd9722aa4de0cbaf7ceae43.tar.gz
go-5246fa5e75b129a7dbd9722aa4de0cbaf7ceae43.zip
mime/multipart: handle ReadForm(math.MaxInt64) better
Returning an error about integer overflow is needlessly pedantic. The meaning of ReadForm(MaxInt64) is easily understood (accept a lot of data) and can be implemented. Fixes #40430. Change-Id: I8a522033dd9a2f9ad31dd2ad82cf08d553736ab9 Reviewed-on: https://go-review.googlesource.com/c/go/+/275112 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/net')
-rw-r--r--src/net/http/request_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/http/request_test.go b/src/net/http/request_test.go
index 19526b9ad7..689498e19d 100644
--- a/src/net/http/request_test.go
+++ b/src/net/http/request_test.go
@@ -285,7 +285,7 @@ func TestMaxInt64ForMultipartFormMaxMemoryOverflow(t *testing.T) {
t.Fatal(err)
}
res.Body.Close()
- if g, w := res.StatusCode, StatusBadRequest; g != w {
+ if g, w := res.StatusCode, StatusOK; g != w {
t.Fatalf("Status code mismatch: got %d, want %d", g, w)
}
}