diff options
author | Keiichi Hirobe <chalenge.akane@gmail.com> | 2020-08-06 01:57:11 +0900 |
---|---|---|
committer | Emmanuel Odeke <emm.odeke@gmail.com> | 2020-10-24 02:36:08 +0000 |
commit | d05c03536573b8c567d3eefaad2aafbf89678015 (patch) | |
tree | 2a63ee6a25a999f88c5fc3d1d4c01ea4529f39f6 | |
parent | 57af9745bfad2c20ed6842878e373d6c5b79285a (diff) | |
download | go-d05c03536573b8c567d3eefaad2aafbf89678015.tar.gz go-d05c03536573b8c567d3eefaad2aafbf89678015.zip |
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 <dneil@google.com>
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
-rw-r--r-- | src/net/http/transport_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
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)) |