]> Cypherpunks repositories - gostls13.git/commit
net/http: pause briefly after closing Server connection when body remains
authorBrad Fitzpatrick <bradfitz@golang.org>
Fri, 24 Jul 2015 21:22:26 +0000 (14:22 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 27 Jul 2015 22:13:08 +0000 (22:13 +0000)
commita3ffd836a6f9f081ea30c77f6d59abe25262410b
tree193dd336d63a55dd5eaa8ba233447a289d7728da
parent249894ab6c4d8439e7fd47ca55ba618d636ab239
net/http: pause briefly after closing Server connection when body remains

From https://github.com/golang/go/issues/11745#issuecomment-123555313
this implements option (b), having the server pause slightly after
sending the final response on a TCP connection when we're about to close
it when we know there's a request body outstanding. This biases the
client (which might not be Go) to prefer our response header over the
request body write error.

Updates #11745

Change-Id: I07cb0b74519d266c8049d9e0eb23a61304eedbf8
Reviewed-on: https://go-review.googlesource.com/12658
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/serve_test.go
src/net/http/server.go
src/net/http/transfer.go
src/net/http/transport.go