]> Cypherpunks repositories - gostls13.git/commit
net/http: update test to check Content-Length 0 Body more reliably
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 18 Oct 2016 21:42:09 +0000 (21:42 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 18 Oct 2016 21:53:31 +0000 (21:53 +0000)
commit97b04152bc3d9df1155bc97d9e6095f69b6882c7
tree088239cfdd06820551b91b89b348d3e13cc1d362
parent75fef5a0f60bcace88a8d7470df2d85d8eee048f
net/http: update test to check Content-Length 0 Body more reliably

The way to send an explicitly-zero Content-Length is to set a nil Body.

Fix this test to do that, rather than relying on type sniffing.

Updates #17480
Updates #17071

Change-Id: I6a38e20f17013c88ec4ea69d73c507e4ed886947
Reviewed-on: https://go-review.googlesource.com/31434
TryBot-Result: Gobot Gobot <gobot@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
src/net/http/clientserver_test.go