]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: update bundled http2 for Server WriteTimeout change
authorBrad Fitzpatrick <bradfitz@golang.org>
Sat, 31 Dec 2016 18:35:15 +0000 (18:35 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sat, 31 Dec 2016 18:54:27 +0000 (18:54 +0000)
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>

src/net/http/h2_bundle.go
src/net/http/serve_test.go

index 2e0b3c905acf9395f91ea0f4ad0269678c4aaed1..4536b2ff5deb1ae8a7d464107a8dac66b7da9da3 100644 (file)
@@ -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 {
index 17cfde7e7a5382379720a6221d0918d891782927..d8561f7c7f0d045b5bd00e97d969fde9e1b75556 100644 (file)
@@ -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")
        }