- 30 Sep, 2016 2 commits
-
-
Brad Fitzpatrick authored
Fix a regression from Go 1.5 to Go 1.6: when we introduced automatic HTTP/2 support in Go 1.6, we never handled Server.ReadTimeout. If a user set ReadTimeout, the net/http package would set the read deadline on the connection during the TLS handshake, but then the http2 package would never disarm it, killing the likely-still-in-use connection after the timeout period. This CL changes it to disarm the timeout after the first request headers, similar to net/http.Server. Unlike net/http.Server, we don't re-arm it on each idle period, because the definition of idle is more complicated with HTTP/2. No tests here for now. Tests will be in the go repo once all the knobs are in place and this is re-bundled into std, testing both http1 and http2. Updates golang/go#16450 (minimal fix for now) Updates golang/go#14204 (considering a new http1+http2 IdleTimeout knob) Change-Id: Iaa1570c118efda7dc0a65ba84cd77885699ec8fc Reviewed-on: https://go-review.googlesource.com/30077Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Tests will be in the go repo's net/http package when this package is re-bundled into std. Updates golang/go#16808 (fixes after bundle into std) Change-Id: Iad31dc120bc008b1e9679bf7b2b988aac9c893c8 Reviewed-on: https://go-review.googlesource.com/30075 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 29 Sep, 2016 4 commits
-
-
Brad Fitzpatrick authored
https://golang.org/cl/29965 adding ClientConn.Ping support introduced a build failure on Go versions before 1.7. Fixes golang/go#17286 Change-Id: Ibfb565e7d823a436e58dc833973d7bdb41b7de5a Reviewed-on: https://go-review.googlesource.com/30071 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
-
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: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
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: Brad Fitzpatrick <bradfitz@golang.org>
-
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: Ian Lance Taylor <iant@golang.org>
-
- 24 Sep, 2016 3 commits
-
-
Mikio Hara authored
Change-Id: I41d449e071f1d40bdc69288e7290af168b6b0d3c Reviewed-on: https://go-review.googlesource.com/29693Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
Change-Id: Iaec7505bea3ea29cd58147b6057f03a4c7f0861c Reviewed-on: https://go-review.googlesource.com/29694Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
Change-Id: I2e0a8f0e344a2fc31b3d40e0b9f3812dbbd75569 Reviewed-on: https://go-review.googlesource.com/29695Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 21 Sep, 2016 1 commit
-
-
Mikio Hara authored
Rename method receivers of propVirtual and make the String method of Inet4Addr use of a pointer receiver. Change-Id: I422593cf4028d83f856efa55c631f69fdce0514d Reviewed-on: https://go-review.googlesource.com/28993 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 20 Sep, 2016 1 commit
-
-
Tom Bergan authored
testServerResponse had dead code -- it was not checking the return value from the handler func. This fix revealed two broken tests, which were also fixed. Change-Id: I7cd6f6c71dbd909fa3b0aff7f98a47dade42913b Reviewed-on: https://go-review.googlesource.com/29434Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 16 Sep, 2016 1 commit
-
-
Mike Appleby authored
Change-Id: I1530dadf32cc85c25dc7c88b4e7b6ebbbbcb2d3a Reviewed-on: https://go-review.googlesource.com/29241Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 14 Sep, 2016 2 commits
-
-
Mikio Hara authored
Change-Id: If0bcd08de56518ec1dd79476bc37e276ae550d47 Reviewed-on: https://go-review.googlesource.com/28998 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
Also consolidate platform-dependent helper files. Updates golang/go#17015. Change-Id: Ibf09479762029ecc7229ab4bb233138e0d4e69d9 Reviewed-on: https://go-review.googlesource.com/28997 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 12 Sep, 2016 3 commits
-
-
Brad Fitzpatrick authored
bodyAndLength mutates Request.Body if Request.ContentLength == 0, reading the first byte to determine whether it's actually empty or just undeclared. But we did that before we checked whether our connection was overloaded, which meant the caller could retry the request on an new or lesser-loaded connection, but then lose the first byte of the request. Updates golang/go#17071 (needs bundle into std before fixed) Change-Id: I996a92ad037b45bc49e7cf0801a2027bbbb3c920 Reviewed-on: https://go-review.googlesource.com/29074Reviewed-by: Gleb Stepanov <glebstepanov1992@gmail.com> Reviewed-by: Chris Broadfoot <cbro@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
No tests, because tests are in std. (See TestTransportIDNA_h2) Updates golang/go#13835 Change-Id: I0a327d9652ea5e6f32dfa279550915af61567bed Reviewed-on: https://go-review.googlesource.com/29071 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Chris Broadfoot <cbro@golang.org>
-
Brad Fitzpatrick authored
In the most recent commit (git 3a1f9e, CL 27632) I introduced a bug where I improperly started rejecting an outgoing :path of '*'. That CL was never vendored into std. Once I tried to vendor it and run the tests, the tests failed due to this regression. So, fix the bug and allow '*' (e.g. for OPTIONS requests). No test updates because the tests are already in std, and now pass (again). Change-Id: Ibb91a17145d381da0fd0ea193e8a1bd59f03c3fa Reviewed-on: https://go-review.googlesource.com/29070Reviewed-by: Chris Broadfoot <cbro@golang.org>
-
- 10 Sep, 2016 1 commit
-
-
Mikio Hara authored
This change fixes lazy socket descriptor handling in ListenPacket to avoid treading on someone's socket descriptors which are recycled by descriptor duplication. The issue happens when calling ListenPacket for non-privileged ICMP endpoint concurrently. Fixes golang/go#16969. Change-Id: I4d7672535f5aeb2a0b71f8af2c7ba271a085f418 Reviewed-on: https://go-review.googlesource.com/28473 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 07 Sep, 2016 1 commit
-
-
Brad Fitzpatrick authored
Temporary workaround until the problem is identified and a more granular skip or fix is added. Updates golang/go#17015 Change-Id: If3f940f9f318a3b41669fd6e870a17727d2fee82 Reviewed-on: https://go-review.googlesource.com/28587Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
- 01 Sep, 2016 1 commit
-
-
Brad Fitzpatrick authored
Updates golang/go#16228 Updates golang/go#11041 Change-Id: I2b50c2f4bfaae2d9ad59bc78e1c7c3e807f08075 Reviewed-on: https://go-review.googlesource.com/28344 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 31 Aug, 2016 1 commit
-
-
Mikio Hara authored
Change-Id: Ia274e47affd5fc2b9bdea077fa8043887044d0ec Reviewed-on: https://go-review.googlesource.com/28110 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 26 Aug, 2016 5 commits
-
-
Mikio Hara authored
Change-Id: I836cdf68901dc77bc4c086cabd9d43fd033fbf1d Reviewed-on: https://go-review.googlesource.com/27736Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Mikio Hara authored
Change-Id: If22f722cf87f7e5833b9c9aea0a078db83f37c26 Reviewed-on: https://go-review.googlesource.com/27734Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Mikio Hara authored
Change-Id: Idb2a2eb354c2835e6cae7e269730c599abb1c8d7 Reviewed-on: https://go-review.googlesource.com/27735 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
Change-Id: Idffb7eace4d7913e7dfad2715d10dcd1762f83e4 Reviewed-on: https://go-review.googlesource.com/27733 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
This change introduces an internal package that provides the manipulation of net package facilities by using runtime reflection. The package is supposed to be used by ipv4 and ipv6 packages. Change-Id: I73ec3b7d3762e675ca03ad9ee5e8a68e75ceb997 Reviewed-on: https://go-review.googlesource.com/27732 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 25 Aug, 2016 1 commit
-
-
Brad Fitzpatrick authored
Fixes golang/go#16847 Change-Id: I1e6ae1e0746051fd4cf7afc9beae7853293d5b68 Reviewed-on: https://go-review.googlesource.com/27632Reviewed-by: Chris Broadfoot <cbro@golang.org>
-
- 19 Aug, 2016 1 commit
-
-
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: Chris Broadfoot <cbro@golang.org>
-
- 11 Aug, 2016 1 commit
-
-
Volker Dobler authored
Update the list to revision 533b016049473e520193e70156e4b54dc1f19568 (2016-08-05T11:21:15Z). Change-Id: Ic79e83245a86a0c27ac855479073be41c970c527 Reviewed-on: https://go-review.googlesource.com/26851Reviewed-by: Nigel Tao <nigeltao@golang.org>
-
- 05 Aug, 2016 1 commit
-
-
Brad Fitzpatrick authored
The http2 spec says: > When the value of SETTINGS_INITIAL_WINDOW_SIZE changes, a receiver > MUST adjust the size of all stream flow-control windows that it > maintains by the difference between the new value and the old value. We didn't do this before, and it never mattered until https://golang.org/cl/25362 for golang/go#16519 because we always knew the peer's initial window size. Once we started writing request bodies before hearing the peer's setting (and thus assuming 64KB), it became very important that this TODO was done. Should've done it earlier. More details in the bug. Updates golang/go#16612 (fixes after bundle into std) Change-Id: I0ac0280bdd5f6e933ad82f8c9df3c4528295bac2 Reviewed-on: https://go-review.googlesource.com/25508Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Chris Broadfoot <cbro@golang.org>
-
- 04 Aug, 2016 1 commit
-
-
Brad Fitzpatrick authored
Change-Id: Ic37b6b84bfc695cfb1ca7cf8e7da52c801e6d236 Reviewed-on: https://go-review.googlesource.com/25500Reviewed-by: Chris Broadfoot <cbro@golang.org>
-
- 03 Aug, 2016 2 commits
-
-
Brad Fitzpatrick authored
For debugging golang/go#16514 Change-Id: I8aa5706eef4e9b4104cab391172b8919601ebf3a Reviewed-on: https://go-review.googlesource.com/25440Reviewed-by: Chris Broadfoot <cbro@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
If the Transport got a stream error on the response headers, it was never unblocking the client. Previously, Response.Body reads would be aborted with the stream error, but RoundTrip itself would never unblock. The Transport now also sends a RST_STREAM to the server when we encounter a stream error. Also, add a "Cause" field to StreamError with additional detail. The old code was just returning the detail, without the stream error header. Fixes golang/go#16572 Change-Id: Ibecedb5779f17bf98c32787b68eb8a9b850833b3 Reviewed-on: https://go-review.googlesource.com/25402 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 02 Aug, 2016 1 commit
-
-
Brad Fitzpatrick authored
To help debug golang/go#16572 Change-Id: Ia154faedd243a06a4110f6e6a4885b7cd0a04e1f Reviewed-on: https://go-review.googlesource.com/25401Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 01 Aug, 2016 2 commits
-
-
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: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
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: Andrew Gerrand <adg@golang.org>
-
- 26 Jul, 2016 2 commits
-
-
Brad Fitzpatrick authored
For both the server and the transport, return connection-level flow control in two cases: 1) when a stream is closed with buffered data not read by the user, or 2) when a DATA frame arrives but there the stream has since been closed. Fixes golang/go#16481 Change-Id: Ic7404180ed04a2903e8fd6e9599a907f88b4f72e Reviewed-on: https://go-review.googlesource.com/25231Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Brad Fitzpatrick authored
NewClientConn starts a goroutine (which reads cc.singleUse at start), so it's not safe to set cc.singleUse after calling NewClientConn. Change-Id: I5c28db15e8e8fd8ec5ef0e04b7f81e61efbd873e Reviewed-on: https://go-review.googlesource.com/25230Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 20 Jul, 2016 1 commit
-
-
Mikio Hara authored
Fixes golang/go#16438. Change-Id: I2a97e57cae298e8eecdd5637c9e03493a449fc62 Reviewed-on: https://go-review.googlesource.com/25070 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 17 Jul, 2016 1 commit
-
-
Brad Fitzpatrick authored
Fixes flakes like: https://build.golang.org/log/56e0561f9f6a740b75538692a1c3288f08949dd0 I reproduced the flake above with a time.Sleep(50 * time.Millisecond) before ClientConn.RoundTrip's final for{select{...}} loop (to give multiple channels time to become readable on the first select), and then ran (on linux/amd64) with: go test -v -run=TestTransportReqBodyAfterResponse_403 -count=50 -race Before, many failed. With this CL it never fails. (crosses fingers) Fixes golang/go#16102 (again) Change-Id: I93fde46846cd09445e53c140e9668382965d95c5 Reviewed-on: https://go-review.googlesource.com/24984 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-