1. 14 Nov, 2016 4 commits
  2. 10 Nov, 2016 1 commit
  3. 09 Nov, 2016 1 commit
  4. 08 Nov, 2016 3 commits
  5. 07 Nov, 2016 1 commit
  6. 04 Nov, 2016 2 commits
  7. 03 Nov, 2016 1 commit
    • Brad Fitzpatrick's avatar
      http2: fix over-aggressive ignoring of frames while in "go away" mode · 569280fa
      Brad Fitzpatrick authored
      https://golang.org/cl/31727 made many of the Server Frame processors
      ignore incoming frames if the connection was in shutdown mode.
      
      The idea was that it's pointless to do work if we're about to hang up
      on them in 250ms anyway for violating a protocol error.
      
      But as of https://golang.org/cl/32412 (graceful shutdown) we can also
      be in "go away" mode for ErrCodeNo, which just means to nicely tell
      them to GOAWAY and because they did nothing wrong, we don't hang up in
      250ms (the value of which gave the peer time to read the error before
      the TCP close), but instead we keep the conn open until it's idle.
      
      The combination of the two CLs made TestTransportAndServerSharedBodyRace_h2
      flaky, since it was never seeing RST_STREAM on cancelation of requests,
      and then Handlers would block forever.
      
      Updates golang/go#17733 (fixes after bundle into std)
      
      Change-Id: I67491c1d7124bc3cb554f9246ea7683f20b6a4e3
      Reviewed-on: https://go-review.googlesource.com/32583
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      569280fa
  8. 02 Nov, 2016 2 commits
  9. 01 Nov, 2016 1 commit
    • Daniel Theophanes's avatar
      webdav: add Context argument to FileSystem interface · 4bb47a10
      Daniel Theophanes authored
      Currently there is no way to pass request scoped information from
      the handler to the FileSytem interface. This can be important
      to pass credentials or timeout parameters to the FileSystem
      operations. Pipe context through the request from
      http.Request.Context(). With pre-go1.7 use context.Background().
      
      Custom FileSystem implementations will need to change, but it will
      only require a new argument in each of the FileSystem methods.
      The change will be trivial to update to.
      
      Fixes golang/go#17658
      
      Change-Id: I7491faf3467ad55db793a68081e074a9b3f9624d
      Reviewed-on: https://go-review.googlesource.com/32421Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      4bb47a10
  10. 31 Oct, 2016 2 commits
  11. 30 Oct, 2016 2 commits
  12. 29 Oct, 2016 3 commits
  13. 28 Oct, 2016 1 commit
  14. 27 Oct, 2016 3 commits
    • Brad Fitzpatrick's avatar
      http2: initialize Server.IdleTimeout from http.Server as http1 does · b336a971
      Brad Fitzpatrick authored
      This makes ConfigureServer initialize the http2 Server's IdleTimeout
      from the http1 Server configuration, using the same rules as
      IdleTimeout in Go 1.8: first use IdleTimeout if specified, else fall
      back to the old ReadTimeout.
      
      Updates golang/go#14204
      
      Change-Id: I4dee971f8416ef0cbf99335a199c46355f9ab09d
      Reviewed-on: https://go-review.googlesource.com/32230
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarTom Bergan <tombergan@google.com>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      b336a971
    • Brad Fitzpatrick's avatar
      http2: fix optimized write scheduling · b626cca9
      Brad Fitzpatrick authored
      Fixes regression from https://golang.org/cl/31495 which generated
      massive stacks like:
      
      net/http.(*http2serverConn).startFrameWrite(0x1890e7e0, 0x859bc70, 0x18c26050, 0x1897c1c0, 0x0)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3664 +0x34a
      net/http.(*http2serverConn).scheduleFrameWrite(0x1890e7e0)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3779 +0x114
      net/http.(*http2serverConn).wroteFrame(0x1890e7e0, 0x859bb50, 0x18c26060, 0x0, 0x0, 0x0, 0x0)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3742 +0xc8
      net/http.(*http2serverConn).startFrameWrite(0x1890e7e0, 0x859bb50, 0x18c26060, 0x0, 0x0)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3689 +0x23f
      net/http.(*http2serverConn).scheduleFrameWrite(0x1890e7e0)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3779 +0x114
      net/http.(*http2serverConn).writeFrame(0x1890e7e0, 0x859bb50, 0x18c26060, 0x0, 0x0)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3648 +0x6b
      net/http.(*http2serverConn).resetStream(0x1890e7e0, 0x1, 0x8, 0x0, 0x0)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3815 +0x91
      net/http.(*http2serverConn).wroteFrame(0x1890e7e0, 0x859b6d0, 0x1890db00, 0x1897c1c0, 0x18ede040, 0x0, 0x0)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3736 +0x124
      net/http.(*http2serverConn).startFrameWrite(0x1890e7e0, 0x859b6d0, 0x1890db00, 0x1897c1c0, 0x18ede040)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3689 +0x23f
      net/http.(*http2serverConn).scheduleFrameWrite(0x1890e7e0)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3779 +0x114
      net/http.(*http2serverConn).wroteFrame(0x1890e7e0, 0x859bc70, 0x18c26018, 0x0, 0x0, 0x0, 0x0)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3742 +0xc8
      net/http.(*http2serverConn).startFrameWrite(0x1890e7e0, 0x859bc70, 0x18c26018, 0x0, 0x0)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3689 +0x23f
      net/http.(*http2serverConn).scheduleFrameWrite(0x1890e7e0)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3779 +0x114
      net/http.(*http2serverConn).wroteFrame(0x1890e7e0, 0x859b730, 0x18ede000, 0x1897c1c0, 0x0, 0x0, 0x0)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3742 +0xc8
      net/http.(*http2serverConn).serve(0x1890e7e0)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3504 +0x50d
      net/http.(*http2Server).ServeConn(0x18ab49a0, 0x859e040, 0x18df2000, 0x1894ae18)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3152 +0x6d9
      net/http.http2ConfigureServer.func1(0x18d364e0, 0x18df2000, 0x859a1b0, 0x18ab2308)
          /tmp/workdir/go/src/net/http/h2_bundle.go:3033 +0x70
      net/http.(*conn).serve(0x18ad60f0, 0x859cbc0, 0x18aa42a0)
          /tmp/workdir/go/src/net/http/server.go:1633 +0xf03
      
      This changes it to be a loop instead.
      
      This also fixes the "internal error: attempt to send frame on
      half-closed-local stream" crash from golang/go#17627 because
      wroteFrame set stateHalfClosedLocal temporarily while calling
      resetStream which itself does a write in some cases. Prior to CL 31495
      those writes were processed breadth-first. CL 31495 made the writes
      generated from resetStream (like the window updates returning unused
      flow-control) more aggressive and scheduled immediately. This loop
      restores the old write scheduling.
      
      Fixes golang/go#17627
      
      Change-Id: I9651568e4105791d24d46819499efc7e018c86c3
      Reviewed-on: https://go-review.googlesource.com/32217Reviewed-by: 's avatarTom Bergan <tombergan@google.com>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b626cca9
    • Tom Bergan's avatar
      http2: implement support for server push · c46f265c
      Tom Bergan authored
      This makes x/net/http2's ResponseWriter implement the new interface,
      http.Pusher. This new interface requires Go 1.8. When compiled against
      older versions of Go, the ResponseWriter does not have a Push method.
      
      Fixes golang/go#13443
      
      Change-Id: I8486ffe4bb5562a94270ace21e90e8c9a4653da0
      Reviewed-on: https://go-review.googlesource.com/29439Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      c46f265c
  15. 24 Oct, 2016 4 commits
    • Tom Bergan's avatar
      http2: reject stream self-dependencies · 65dfc087
      Tom Bergan authored
      Fix spec bug: Section 5.3.1 says that self-dependencies should be
      treated as a stream error of type PROTOCOL_ERROR.
      
      Updates golang/go#16046
      
      Change-Id: I8b5dc8808943dc96aac0c543c7032fa989ab9e0b
      Reviewed-on: https://go-review.googlesource.com/31858Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      65dfc087
    • Brad Fitzpatrick's avatar
      http2: optimize server frame writes · e7b14352
      Brad Fitzpatrick authored
      Don't do async frame writes when the write is known to be small enough
      to definitely fit in the write buffer and not cause a flush (which
      might block). This avoids starting a new goroutine and doing a channel
      send operation for many frame writes.
      
      name                  old time/op    new time/op    delta
      ServerGets-4             146µs ± 2%     144µs ± 1%  -1.46%        (p=0.000 n=14+14)
      ServerPosts-4            162µs ± 1%     160µs ± 1%  -1.15%        (p=0.000 n=15+15)
      Server_GetRequest-4      145µs ± 1%     143µs ± 0%  -1.26%        (p=0.000 n=15+15)
      Server_PostRequest-4     160µs ± 1%     158µs ± 1%  -1.32%        (p=0.000 n=15+15)
      
      The headers frame is the main last one which might show some benefit
      if there's a cheap enough way to conservatively calculate its size.
      
      Change-Id: I9be2ddbf04689340819d8701ea671fff378d9e79
      Reviewed-on: https://go-review.googlesource.com/31495
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      e7b14352
    • Tom Bergan's avatar
      http2: interface to support pluggable schedulers · 4be9b97e
      Tom Bergan authored
      This adds an interface to support pluggable schedulers. The interface
      is defined in writesched.go. The only type needed by this interface is
      FrameWriteRequest, which describes a request to write a frame (this used
      to be called frameWriteMsg). The scheduler can be configured with a new
      field in http2.Server. Two schedulers are implemented:
      
      1) A random scheduler that is essentially equivalent to the existing
         scheduler. This is currently the default scheduler if none is
         configured. The implementation is in writesched_random.go.
      
      2) A scheduler that uses H2 weights and priorities. The H2 priority tree
         is maintained as a tree of priorityNodes. The next frame is chosen by
         walking this tree in topological order, where sibling nodes are ordered
         by their bandwidth usage relative to their H2 weight. Two optional
         features are added to improve performance -- these are configured with
         PriorityWriteSchedulerConfig.
      
      Fixes golang/go#16168
      
      Change-Id: I97ec93e5c58c2efec35455ba2f3c31e849f706af
      Reviewed-on: https://go-review.googlesource.com/25366Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      4be9b97e
    • Nigel Tao's avatar
      publicsuffix: update table to latest list from publicsuffix.org · 5695785b
      Nigel Tao authored
      Update the list to revision 915565885d0fbd25caf7d8b339cd3478f558da94
      (2016-10-19T08:16:09Z).
      
      Change-Id: Ie94e7237015f2d84e0a0d082bd7ff9e04b05ecd9
      Reviewed-on: https://go-review.googlesource.com/31530Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      5695785b
  16. 23 Oct, 2016 1 commit
  17. 22 Oct, 2016 1 commit
  18. 21 Oct, 2016 2 commits
  19. 20 Oct, 2016 2 commits
  20. 19 Oct, 2016 1 commit
    • Brad Fitzpatrick's avatar
      http2: make Server reuse 64k request body buffer between requests · 3bafa332
      Brad Fitzpatrick authored
      name           old time/op    new time/op    delta
      ServerPosts-4     192µs ± 1%     164µs ± 1%  -14.16%  (p=0.000 n=17+19)
      
      name           old alloc/op   new alloc/op   delta
      ServerPosts-4    69.8kB ± 0%     2.8kB ± 0%  -95.95%  (p=0.000 n=18+18)
      
      name           old allocs/op  new allocs/op  delta
      ServerPosts-4      42.0 ± 0%      40.0 ± 0%   -4.76%  (p=0.000 n=20+20)
      
      This is a redo of git rev e7da8eda (golang.org/cl/20542) which had a race
      and was later reverted in golang.org/cl/21160.
      
      Updates golang/go#14960
      Updates grpc/grpc-go#604
      
      Change-Id: Ie216e45730dce4fc0c58f295bcbc669973145599
      Reviewed-on: https://go-review.googlesource.com/31447
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      3bafa332
  21. 18 Oct, 2016 1 commit
  22. 13 Oct, 2016 1 commit