1. 29 Sep, 2016 3 commits
    • Olivier Poitrey's avatar
      http2: implement Ping method on ClientConn · ed0556cc
      Olivier Poitrey authored
      This new method sends a PING frame with random payload to the peer and
      wait for a PING ack with the same payload.
      
      In order to support cancellation and deadling, the Ping method takes a
      context as argument.
      
      Fixes golang/go#15475
      
      Change-Id: I340133a67717af89556837cc531a885d116eba59
      Reviewed-on: https://go-review.googlesource.com/29965Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      ed0556cc
    • ayanamist's avatar
      x/net/http2: use request url scheme · fbd690d9
      ayanamist authored
      The existing implementation has a hardcoded "https" scheme for
      all request, since it allows http scheme in the request, it should
      use the scheme in the request url.
      
      Fixes golang/go#17257
      
      Change-Id: Ibd9528df0328d7630ee94a006db694645625cdc9
      Reviewed-on: https://go-review.googlesource.com/29975
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      fbd690d9
    • Mikio Hara's avatar
      lif: new package · 9f0e377a
      Mikio Hara authored
      This change introduces a package that provides basic functions for the
      manipulation of logical network interfaces, interface addresses and
      data links on Solaris.
      
      As BSD variants implement routing socket and routing messages, Linux
      implements netlink socket and netlink messages, Solaris implements
      STREAMS-like interface for reading, writing network facility
      information inside the kernel. The package wraps various I/O control
      calls which involve message exchanges between kernel protocol modules
      in exposed APIs.
      
      At present, the package supports Solaris 11 or above.
      
      Updates golang/go#7177.
      
      Change-Id: I192d85e53b0bee942dfefca0f73a3eb94ab8bfe9
      Reviewed-on: https://go-review.googlesource.com/29893Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      9f0e377a
  2. 24 Sep, 2016 3 commits
  3. 21 Sep, 2016 1 commit
  4. 20 Sep, 2016 1 commit
  5. 16 Sep, 2016 1 commit
  6. 14 Sep, 2016 2 commits
  7. 12 Sep, 2016 3 commits
  8. 10 Sep, 2016 1 commit
  9. 07 Sep, 2016 1 commit
  10. 01 Sep, 2016 1 commit
  11. 31 Aug, 2016 1 commit
  12. 26 Aug, 2016 5 commits
  13. 25 Aug, 2016 1 commit
  14. 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
  15. 11 Aug, 2016 1 commit
  16. 05 Aug, 2016 1 commit
  17. 04 Aug, 2016 1 commit
  18. 03 Aug, 2016 2 commits
  19. 02 Aug, 2016 1 commit
  20. 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
  21. 26 Jul, 2016 2 commits
  22. 20 Jul, 2016 1 commit
  23. 17 Jul, 2016 2 commits
  24. 16 Jul, 2016 1 commit
  25. 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