From: Keiichi Hirobe Date: Wed, 5 Aug 2020 16:57:11 +0000 (+0900) Subject: net/http: fix typo in TestTransportReadToEndReusesConn X-Git-Tag: go1.16beta1~554 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d05c03536573b8c567d3eefaad2aafbf89678015;p=gostls13.git 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 --- 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))