]> Cypherpunks repositories - gostls13.git/commit
net/http: teach NewRequest that NoBody has ContentLength zero
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 30 Nov 2016 18:45:56 +0000 (18:45 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 1 Dec 2016 20:36:18 +0000 (20:36 +0000)
commit1102c70bc425e66d3b8981f69a40bd2043cf7e60
treeb27798653d83eabe2ff452cec22268c1bff0ffaa
parent2cfb6d54421956e27836b728a5c36e470d9cb0f1
net/http: teach NewRequest that NoBody has ContentLength zero

NoBody is new in Go 1.8.

Found while investigating #18117

Change-Id: I6bda030f358e2270f090d108cb3a89c8a2665fcb
Reviewed-on: https://go-review.googlesource.com/33714
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/http/request.go
src/net/http/request_test.go