mirror of https://github.com/golang/go.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 <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>
This commit is contained in:
parent
57af9745bf
commit
d05c035365
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue