aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2016-12-31 18:35:15 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2016-12-31 18:54:27 +0000
commite776975ae61e8db6ff5db33b039513c9d8524794 (patch)
tree4bb4662f816d19e174770242d86f7901cc415dc4
parentb63ca1e9743571e37c42350d3931400fe4c89386 (diff)
downloadgo-e776975ae61e8db6ff5db33b039513c9d8524794.tar.gz
go-e776975ae61e8db6ff5db33b039513c9d8524794.zip
net/http: update bundled http2 for Server WriteTimeout change
Updates http2 to x/net/http2 git rev 8fd7f25 for: http2: clear WriteTimeout in Server https://golang.org/cl/34724 And un-skip the new test. (The new test is a slow test, anyway, so won't affect builders or all.bash, but I verified it now passes.) Updates #18437 Change-Id: Ia91ae702edfd23747a9d6b61da284a5a957bfed3 Reviewed-on: https://go-review.googlesource.com/34729 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> Reviewed-by: Kale B <kale@lemnisys.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-rw-r--r--src/net/http/h2_bundle.go4
-rw-r--r--src/net/http/serve_test.go1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/net/http/h2_bundle.go b/src/net/http/h2_bundle.go
index 2e0b3c905a..4536b2ff5d 100644
--- a/src/net/http/h2_bundle.go
+++ b/src/net/http/h2_bundle.go
@@ -3141,6 +3141,10 @@ func (s *http2Server) ServeConn(c net.Conn, opts *http2ServeConnOpts) {
pushEnabled: true,
}
+ if sc.hs.WriteTimeout != 0 {
+ sc.conn.SetWriteDeadline(time.Time{})
+ }
+
if s.NewWriteScheduler != nil {
sc.writeSched = s.NewWriteScheduler()
} else {
diff --git a/src/net/http/serve_test.go b/src/net/http/serve_test.go
index 17cfde7e7a..d8561f7c7f 100644
--- a/src/net/http/serve_test.go
+++ b/src/net/http/serve_test.go
@@ -537,7 +537,6 @@ func TestServerTimeouts(t *testing.T) {
// Test that the HTTP/2 server handles Server.WriteTimeout (Issue 18437)
func TestHTTP2WriteDeadlineExtendedOnNewRequest(t *testing.T) {
- t.Skip("disabled until Issue 18437 is fixed")
if testing.Short() {
t.Skip("skipping in short mode")
}