Skip to content

Commit d05c035

Browse files
KeiichiHirobeodeke-em
authored andcommitted
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 <[email protected]> Trust: Alberto Donizetti <[email protected]> Trust: Damien Neil <[email protected]> Run-TryBot: Emmanuel Odeke <[email protected]> TryBot-Result: Go Bot <[email protected]>
1 parent 57af974 commit d05c035

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net/http/transport_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ func TestTransportReadToEndReusesConn(t *testing.T) {
412412
w.WriteHeader(200)
413413
w.(Flusher).Flush()
414414
} else {
415-
w.Header().Set("Content-Type", strconv.Itoa(len(msg)))
415+
w.Header().Set("Content-Length", strconv.Itoa(len(msg)))
416416
w.WriteHeader(200)
417417
}
418418
w.Write([]byte(msg))

0 commit comments

Comments
 (0)