1. 26 Aug, 2016 5 commits
  2. 25 Aug, 2016 1 commit
  3. 19 Aug, 2016 1 commit
    • Brad Fitzpatrick's avatar
      http2: fix protocol violation regression when writing certain request bodies · 7394c112
      Brad Fitzpatrick authored
      The mod_h2 workaround CL (git rev 28d1bd4f,
      https://golang.org/cl/25362) introduced a regression where the
      Transport could write two DATA frames, both with END_STREAM, if the
      Request.Body returned (non-0, io.EOF). strings.Reader, bytes.Reader
      are the most common Reader types used with HTTP requests and they only
      return (0, io.EOF) so we got generally lucky and things seemed to
      work, but other Readers do return (non-0, io.EOF), like the HTTP
      transport/server Readers. This is why we broke the HTTP proxy code,
      when proxying to HTTP/2.
      
      Updates golang/go#16788 (fixes after it's bundled into std)
      
      Change-Id: I42684017039eacfc27ee53e9c11431f713fdaca4
      Reviewed-on: https://go-review.googlesource.com/27406
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarChris Broadfoot <cbro@golang.org>
      7394c112
  4. 11 Aug, 2016 1 commit
  5. 05 Aug, 2016 1 commit
  6. 04 Aug, 2016 1 commit
  7. 03 Aug, 2016 2 commits
  8. 02 Aug, 2016 1 commit
  9. 01 Aug, 2016 2 commits
    • Brad Fitzpatrick's avatar
      http2: make Transport work around mod_h2 bug · 28d1bd4f
      Brad Fitzpatrick authored
      The http2 server implementation in Apache (mod_http2, aka mod_h2) had
      a bug where it didn't reply to the initial SETTINGS frame until it had
      received a request. Apache 2.4.17 was the first Apache version to
      include mod_http2 and has the bug.
      
      The bug was fixed 20 days ago
      (https://github.com/apache/httpd/commit/de4e3031aeb9775d2ebb9c917ecb1117c12d05f8)
      for Apache 2.5.0 and included in the out-of-tree mod_h2 1.5.12
      (https://github.com/icing/mod_h2/releases/tag/v1.5.12) but most Apache
      sites are running older versions making them incompatible with Go's
      client. (At least Debian Stretch and Ubuntu Xenial, currently.)
      
      Chrome, curl, Firefox et al don't wait for the initial SETTINGS
      response & ACK before sending their first request, which is why
      mod_http2 didn't notice their bug for some time.
      
      This change makes Go's http2.Transport act like other common HTTP/2
      clients and not wait for the peer's SETTINGS frame & ACK before
      sending the first request.
      
      As a bonus, this reduces the latency for the first request on
      connections by one RTT.
      
      The reason we waited for the initial settings is purely
      historical. Andrew and I just wrote it that way when initially
      developing the client on video (https://www.youtube.com/watch?v=yG-UaBJXZ80)
      because we were working top-down through the protocol and didn't
      get back to optimizing the RTT away. It also seemed more compliant to
      wait for the peer's SETTINGS to know the frame size and such, but as
      as spec says, it's permitted for clients to not wait:
      
      http://httpwg.org/specs/rfc7540.html#rfc.section.3.5
      
      > To avoid unnecessary latency, clients are permitted to send
      > additional frames to the server immediately after sending the client
      > connection preface, without waiting to receive the server connection
      > preface. It is important to note, however, that the server
      > connection preface SETTINGS frame might include parameters that
      > necessarily alter how a client is expected to communicate with the
      > server. Upon receiving the SETTINGS frame, the client is expected to
      > honor any parameters established. In some configurations, it is
      > possible for the server to transmit SETTINGS before the client sends
      > additional frames, providing an opportunity to avoid this issue.
      
      So, don't wait.
      
      Fixes golang/go#16519
      
      Change-Id: I916827e49829f7f107a51838512816916fb553fc
      Reviewed-on: https://go-review.googlesource.com/25362Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      28d1bd4f
    • Brad Fitzpatrick's avatar
      http2: don't ignore DATA padding in flow control · 35028a49
      Brad Fitzpatrick authored
      http://httpwg.org/specs/rfc7540.html#rfc.section.6.1 says:
      
      > The entire DATA frame payload is included in flow control, including
      > the Pad Length and Padding fields if present.
      
      But we were just ignoring the padding and pad length, which could lead
      to clients and servers getting out of sync and deadlock if peers used
      padding. (Go never does, so it didn't affect Go<->Go)
      
      In the process, fix a lingering bug from golang/go#16481 where we
      didn't account for flow control returned to peers in the stream's
      inflow, despite sending the peer a WINDOW_UPDATE.
      
      Fixes golang/go#16556
      Updates golang/go#16481
      
      Change-Id: If7150fa8f0da92a60f34af9c3f754a0346526ece
      Reviewed-on: https://go-review.googlesource.com/25382
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
      35028a49
  10. 26 Jul, 2016 2 commits
  11. 20 Jul, 2016 1 commit
  12. 17 Jul, 2016 2 commits
  13. 16 Jul, 2016 1 commit
  14. 15 Jul, 2016 1 commit
    • Brad Fitzpatrick's avatar
      http2: fix flaky TestTransportResPattern_* tests · e90d6d0a
      Brad Fitzpatrick authored
      The test's server was replying with the stream closure before reading
      the test client's request body. This should in theory be handled
      better (and golang/go#16029 will be kept open to track it), but that's not
      what this test was trying to test anyway.
      
      Instead, make the test do things in the expected order so it can
      continue to test its original subject reliably. (It was trying to test
      all the orders of optional & optionally fragmented headers in responses.)
      
      Updates golang/go#16029 (flaky http2 TestTransportResPattern_*)
      Updates golang/go#11811 (subrepos need to be green)
      
      Change-Id: I631730fce5dad598120bb2d1ea8895e39255d711
      Reviewed-on: https://go-review.googlesource.com/24970Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      e90d6d0a
  15. 13 Jul, 2016 2 commits
  16. 07 Jul, 2016 2 commits
  17. 30 Jun, 2016 1 commit
  18. 29 Jun, 2016 1 commit
  19. 28 Jun, 2016 1 commit
  20. 27 Jun, 2016 3 commits
  21. 21 Jun, 2016 1 commit
  22. 20 Jun, 2016 1 commit
  23. 19 Jun, 2016 1 commit
  24. 18 Jun, 2016 1 commit
  25. 16 Jun, 2016 1 commit
  26. 09 Jun, 2016 1 commit
  27. 08 Jun, 2016 1 commit
  28. 07 Jun, 2016 1 commit