net/http: add test confirming a connection reuse case
net/http: add test confirming a connection reuse case

Verify that for a server doing chunked encoding, with the final data
and EOF arriving together, the client will reuse the connection even
if it closes the body without seeing an EOF. The server sends at least
one non-zero chunk and one zero chunk. This verifies that the client's
bufio reading reads ahead and notes the EOF, so even if the JSON
decoder doesn't read the EOF itself, as long as somebody sees it, a
close won't forcible tear down the connection. This was true at least
of https://golang.org/cl/21291

No code change. Test already passed (even with lots of runs, including
in race mode with randomized goroutine scheduling).

Updates #15703

Change-Id: I2140b3eec6b099b6b6e54f153fe271becac5d949
Reviewed-on: https://go-review.googlesource.com/23200
Run-TryBot: Brad Fitzpatrick <ae9783c0b0efc69cd85ab025ddd17aa44cdc4aa5@golang.org>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Andrew Gerrand <395a7d33bec8475c9b83b7d440f141bcbd994aa5@golang.org>

akutz/go,cloudflare/go,vsekhar/elastic-go,theif519/go,josharian/go,momchil-velikov/go,4ad/go,derekmarcotte/go,codestation/go,suncycheng/go,derekmarcotte/go,goodlang/good,polyverse-security/go,cloudflare/go,goodlang/good,akutz/go,theif519/go,nawawi/go,Cofyc/go,vsekhar/elastic-go,goodlang/good,ganboing/go-esx,ImJasonH/go,CAFxX/go,codestation/go,vsekhar/elastic-go,polyverse-security/go,CAFxX/go,momchil-velikov/go,ImJasonH/go,theif519/go,derekmarcotte/go,akutz/go,ImJasonH/go,nawawi/go,ImJasonH/go,vsekhar/elastic-go,codestation/go,derekmarcotte/go,golang/go,momchil-velikov/go,linux-on-ibm-z/go,theif519/go,linux-on-ibm-z/go,cloudflare/go,linux-on-ibm-z/go,codestation/go,CAFxX/go,josharian/go,golang/go,polyverse-security/go,goodlang/good,nawawi/go,Cofyc/go,theif519/go,momchil-velikov/go,goodlang/good,vsekhar/elastic-go,nawawi/go,cloudflare/go,ganboing/go-esx,christopher-henderson/Go,akutz/go,derekmarcotte/go,cloudflare/go,linux-on-ibm-z/go,Cofyc/go,Cofyc/go,akutz/go,4ad/go,cloudflare/go,4ad/go,cloudflare/go,4ad/go,linux-on-ibm-z/go,vsekhar/elastic-go,nawawi/go,CAFxX/go,suncycheng/go,golang/go,nawawi/go,josharian/go,ImJasonH/go,goodlang/good,derekmarcotte/go,josharian/go,ganboing/go-esx,golang/go,cloudflare/go,polyverse-security/go,ImJasonH/go,suncycheng/go,polyverse-security/go,akutz/go,momchil-velikov/go,ganboing/go-esx,momchil-velikov/go,suncycheng/go,polyverse-security/go,CAFxX/go,linux-on-ibm-z/go,ganboing/go-esx,theif519/go,vsekhar/elastic-go,josharian/go,vsekhar/elastic-go,polyverse-security/go,suncycheng/go,golang/go,4ad/go,codestation/go,josharian/go,nawawi/go,CAFxX/go,linux-on-ibm-z/go,codestation/go,suncycheng/go,CAFxX/go,4ad/go,ganboing/go-esx,momchil-velikov/go,CAFxX/go,akutz/go,Cofyc/go,derekmarcotte/go,ganboing/go-esx,Cofyc/go,linux-on-ibm-z/go,Cofyc/go,nawawi/go,theif519/go,polyverse-security/go,suncycheng/go,ganboing/go-esx,codestation/go,4ad/go,ImJasonH/go,golang/go,josharian/go,goodlang/good,suncycheng/go,momchil-velikov/go,theif519/go,akutz/go,golang/go,golang/go,goodlang/good,codestation/go,ImJasonH/go,derekmarcotte/go,4ad/go,josharian/go,Cofyc/go