From d05c03536573b8c567d3eefaad2aafbf89678015 Mon Sep 17 00:00:00 2001 From: Keiichi Hirobe Date: Thu, 6 Aug 2020 01:57:11 +0900 Subject: [PATCH] net/http: fix typo in TestTransportReadToEndReusesConn The test sets a Content-Type where it looks like it wants a Content-Length. The test passes because the Content-Length header is automatically added anyway, but fix the typo and set Content-Length as intended. Change-Id: Ic2af778f82c3e9d58e164892f6ac6ef5745f884f Reviewed-on: https://go-review.googlesource.com/c/go/+/246977 Reviewed-by: Damien Neil Trust: Alberto Donizetti Trust: Damien Neil Run-TryBot: Emmanuel Odeke TryBot-Result: Go Bot --- src/net/http/transport_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/http/transport_test.go b/src/net/http/transport_test.go index 58f0d9db98..e69133e786 100644 --- a/src/net/http/transport_test.go +++ b/src/net/http/transport_test.go @@ -412,7 +412,7 @@ func TestTransportReadToEndReusesConn(t *testing.T) { w.WriteHeader(200) w.(Flusher).Flush() } else { - w.Header().Set("Content-Type", strconv.Itoa(len(msg))) + w.Header().Set("Content-Length", strconv.Itoa(len(msg))) w.WriteHeader(200) } w.Write([]byte(msg)) -- 2.50.0