From 5246fa5e75b129a7dbd9722aa4de0cbaf7ceae43 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 3 Dec 2020 09:45:07 -0500 Subject: 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 Run-TryBot: Russ Cox TryBot-Result: Go Bot Reviewed-by: Ian Lance Taylor --- src/net/http/request_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net/http/request_test.go') 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) } } -- cgit v1.3