- 02 Feb, 2018 1 commit
-
-
Lorenz Bauer authored
We mustn't use data from p.header to pre-allocate slices for Message.Question, etc. Otherwise an attacker can force the allocation of several MiB per parsed message, which can lead to a DoS via putting pressure on the GC. Fixes golang/go#23214 Change-Id: I6c99577f625b08331b438533adb6b8167bcd1ec5 Reviewed-on: https://go-review.googlesource.com/85135Reviewed-by: Ian Gudger <igudger@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 01 Feb, 2018 3 commits
-
-
Brad Fitzpatrick authored
Change-Id: I1cdb799ce509f94e3541bf3e94cb75b3797269f6 Reviewed-on: https://go-review.googlesource.com/91517Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
Brad Fitzpatrick authored
This makes HTTP challenges work on https://http2.golang.org/ since LetsEncrypted disabled the TLS-SNI challenges. Also, move it from a systemd unit on CoreOS to GKE. Updates golang/go#23627 Fixes golang/go#23034 Change-Id: Id8348e9e56ab43e277f1e12d563fd8fc490d6211 Reviewed-on: https://go-review.googlesource.com/91495Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
Nigel Tao authored
Fixes golang/go#23507 Change-Id: Id39b28f211dfdb6a5464752b8b62e2528b46286b Reviewed-on: https://go-review.googlesource.com/91315Reviewed-by: David Symonds <dsymonds@golang.org>
-
- 24 Jan, 2018 1 commit
-
-
Kevin Burke authored
iana.org, www.iana.org and data.iana.org all present a valid TLS certificate, so let's use it when fetching data to avoid errors in transit. Change-Id: I1f295442d24a221fe2b722c4782dceee38b960ec Reviewed-on: https://go-review.googlesource.com/89415Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 12 Jan, 2018 1 commit
-
-
Nigel Tao authored
Change-Id: I39359b5fa52faf5b69005ba47b58be3beec16c4e Reviewed-on: https://go-review.googlesource.com/87515Reviewed-by: David Symonds <dsymonds@golang.org>
-
- 10 Jan, 2018 1 commit
-
-
Brad Fitzpatrick authored
In a given program there may be two separate copies of ErrNoCachedConn: the h2_bundle.go version in net/http, and the user's golang.org/x/net/http2 version. We need to be able to detect either in net/http. This CL adds a function to report whether an error value represents that type of error, and then a subsequent CL to net/http will use it instead of ==. Updates golang/go#22091 Change-Id: I86f1e20704eee29b8980707b700d7a290107dfd4 Reviewed-on: https://go-review.googlesource.com/87297Reviewed-by: Tom Bergan <tombergan@google.com>
-
- 08 Jan, 2018 1 commit
-
-
Mikio Hara authored
s/packet/message/g Change-Id: I2adf809bb4b90e78cf894e4cb6832c117042deb7 Reviewed-on: https://go-review.googlesource.com/65830 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Gudger <igudger@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 05 Jan, 2018 1 commit
-
-
Brad Fitzpatrick authored
Tests will be in net/http in a separate CL. Updates golang/go#23010 Change-Id: I91a6875b9a59b33a3c669e73dd6632ac523eb9f6 Reviewed-on: https://go-review.googlesource.com/86255Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 12 Dec, 2017 1 commit
-
-
Mikio Hara authored
Change-Id: Ic4e0dc9ef27522606061e2ab212a9d6b2b40dd64 Reviewed-on: https://go-review.googlesource.com/83435 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 07 Dec, 2017 7 commits
-
-
Mikio Hara authored
This reverts commit 5c0ad186. Change-Id: I1b6fac0f88816f4464e732d2f8a3d5510decb255 Reviewed-on: https://go-review.googlesource.com/82697Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
Mikio Hara authored
This reverts commit eb818ae5. Change-Id: I2034119c7a512c7ceffa72e837e4bed3ff01ed8d Reviewed-on: https://go-review.googlesource.com/82696Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
Mikio Hara authored
This reverts commit a0df0836. Change-Id: Iec23fd267fd74470dbc827aa6422c6e598b6e86c Reviewed-on: https://go-review.googlesource.com/82695Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
Mikio Hara authored
Change-Id: I21ec68eef6cf14e0ff30b437d717d46e1dc9fea5 Reviewed-on: https://go-review.googlesource.com/82456 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Change-Id: Ide52e52d6859378bc12bb97081f63d657cb2a76f Reviewed-on: https://go-review.googlesource.com/82455 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Change-Id: I7c88abdd74effca1cd8dd72970f0bee914e82fc2 Reviewed-on: https://go-review.googlesource.com/82457 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Fixes golang/go#22301. Change-Id: I29f4f8806e10aad59cf7f984fd346acc216b0fd0 Reviewed-on: https://go-review.googlesource.com/79855 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 29 Nov, 2017 1 commit
-
-
Brad Fitzpatrick authored
Updates golang/go#22927 Change-Id: I813b9ba92f9dd7e517385dc95df20691efee01a6 Reviewed-on: https://go-review.googlesource.com/80755Reviewed-by: Benny Siegert <bsiegert@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 28 Nov, 2017 5 commits
-
-
Tom Bergan authored
That test makes a request with no body and receives a response with no body. The client will receive a HEADERS frame with END_STREAM. The test assumes that the stream is closed immediately on receipt of that HEADERS frame, i.e., before RoundTrip returns. This assumption was broken by https://golang.org/cl/70510, which made stream closure asynchronous w.r.t. RoundTrip. To fix TestCloseIdleConnections_h2 while preserving the intent of CL 70510, we break processHeaders into two cases: 1. The request has a body. In this case, END_STREAM puts the stream in a half-closed-remote state, which means the connection is not necessarily idle when RoundTrip returns (since the request body is still being uploaded). In this case, we preserve the behavior from CL 70510. 2. The request does not have a body. In this case, END_STREAM puts the stream in a closed state and we must close the stream before returning from RoundTrip. The following command passes when this CL is merged into net/http: go test -count=100000 -run=TestCloseIdleConnections_h2 net/http Updates golang/go#22413 Change-Id: Iff2a0685a636ad51bff380e86a42b0d0eea984e5 Reviewed-on: https://go-review.googlesource.com/80139 Run-TryBot: Tom Bergan <tombergan@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Gregory Man authored
In invalid response tests logger write error messages to stderr and spam test output. Since we know response are invalid in these tests we can safely discard logger output. Fixes golang/go#22850 Change-Id: Id8c97be910f0cf7dbe2380ba632960364bc8478b Reviewed-on: https://go-review.googlesource.com/80235Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Go 1.8 doesn't have t.Helper. Fix the row of red on the dashboard. Change-Id: I85d4bb9fe38e989dc3b6a4e99705599745b83cef Reviewed-on: https://go-review.googlesource.com/80140 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Tom Bergan <tombergan@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tom Bergan authored
AFAICT, activeRes serves no real purpose. It is used in just two ways: - To reduce the number of calls to closeIfIdle, which reduces the number of acquires of cc.mu when there are many concurrent streams. I dug through the CL history and could not find any benchmarks showing that this is necessary. - To avoid redundant calls to cs.bufPipe.CloseWithError(err) when a read loop is shutdown. This is unnecessary, since redundant CloseWithError calls are ignored. Since there isn't a good reason to have activeRes, the simplest way to fix the leak is to remove activeRes entirely. Updates golang/go#21543 Change-Id: I1d1d2dc6c946425a2772c8bf71436707021ac269 Reviewed-on: https://go-review.googlesource.com/80137Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tom Bergan authored
This change was originally made in https://golang.org/cl/46631, however, that change was applited to net/http/h2_bundle.go instead of x/net/http2. Updates golang/go#20784 Change-Id: I947fa4c19f3efc400856573768140bece28276a2 Reviewed-on: https://go-review.googlesource.com/80135 Run-TryBot: Tom Bergan <tombergan@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 27 Nov, 2017 3 commits
-
-
Brad Fitzpatrick authored
Tests are in net/http. (upcoming CL) Updates golang/go#22880 Change-Id: Ie94693ad4e14f0c07926a0b6c7827caace94a0aa Reviewed-on: https://go-review.googlesource.com/80076Reviewed-by: Tom Bergan <tombergan@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tom Bergan authored
This fixes TestTrailersClientToServer_h2. Before this CL, the following command reliably fails. With this CL merged into net/http, the following command reliably succeeds. go test -race -run=TestTrailersClientToServer_h2 -count 1000 net/http Updates golang/go#22721 Change-Id: I05d1504c60854fcf3ae9531f36a126e94b00f0b7 Reviewed-on: https://go-review.googlesource.com/79238Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
-
Brad Fitzpatrick authored
In golang/go#22880, our http2 server was sending a HEADERS response without a :status header. Our client code correctly returned an error from RoundTrip, but we forgot to clean up properly, and then subsequently crashed on a DATA frame. This fixes the Transport crash. A fix for the server bug will come separately. Change-Id: Iea3bcf4a8c95963c8b5e2b6dd722177607bd1bc1 Reviewed-on: https://go-review.googlesource.com/80056 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tom Bergan <tombergan@google.com>
-
- 23 Nov, 2017 1 commit
-
-
Roger Peppe authored
This factors out the HTTP proxy functionality from net/http, with a view to vendoring it into net/http later. See discussion in https://go-review.googlesource.com/c/go/+/68091 Change-Id: I8df8a92a13bca03504edd24b71a9a184f290b87d Reviewed-on: https://go-review.googlesource.com/76910Reviewed-by: roger peppe <rogpeppe@gmail.com>
-
- 22 Nov, 2017 1 commit
-
-
Brad Fitzpatrick authored
Updates golang/go#18776 Change-Id: I7568f779e2b86c72c54c8744c08cc02988dde55b Reviewed-on: https://go-review.googlesource.com/79498 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tom Bergan <tombergan@google.com>
-
- 15 Nov, 2017 1 commit
-
-
Frederic Guillot authored
This code snippet should contains the prefix "html" like other examples to be consistent. Change-Id: I32428452625c016894aebc2011cde2dd614e6ed9 Reviewed-on: https://go-review.googlesource.com/77830Reviewed-by: Gabriel Aszalos <gabriel.aszalos@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Gabriel Aszalos <gabriel.aszalos@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 07 Nov, 2017 1 commit
-
-
Anmol Sethi authored
The HTTP/2 RFC does indeed mandate TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 but in practice, people are also using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 becuase they are only using an ECDSA certificate. This is the case in acme/autocert. It doesn't make sense to enforce only RSA in cipher suites if it will never be used because they are using a ECDSA certificate. Change-Id: I86dac192a3eb9b74e4268310a3b550b3bd88a37f Reviewed-on: https://go-review.googlesource.com/30721Reviewed-by: Tom Bergan <tombergan@google.com> Run-TryBot: Tom Bergan <tombergan@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 02 Nov, 2017 2 commits
-
-
Tom Bergan authored
Based on golang/go#19653, it should be possible to reuse an http.Request object after the outstanding request has completed. This CL fixes a race in the http/2 library that occurs when a caller tries to reuse an http.Request just after the request completed. The new test failed with -race before this CL and passes after this CL. Verified with -count 10000. Updates golang/go#21316 Change-Id: I014cf9cefd0dd21f6f41763ba554d23ddc7fca40 Reviewed-on: https://go-review.googlesource.com/75530Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Marcel van Lohuizen authored
See CL 73730: avoid memory leak in validation codes Upstream at 8253218a. Change-Id: I3d4860989c8e057f9cc4c9087a78c9c800c5aa7d Reviewed-on: https://go-review.googlesource.com/74954Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 01 Nov, 2017 1 commit
-
-
Tom Bergan authored
There was a case where we forgot to undo this wrapper. Instead of fixing that case, I moved the implementation of ClientConn.RoundTrip into an unexported method that returns the same info as a bool. Fixes golang/go#22136 Change-Id: I7e5fc467f9c26fb74b9b83f2b3b7f8882645e34c Reviewed-on: https://go-review.googlesource.com/75252Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 27 Oct, 2017 1 commit
-
-
Ben Burkert authored
Add an AppendPack method to Message that appends the message data into a byte buffer. Reusing a buffer allows for a reduction in allocations. name time/op Pack-8 5.04µs ± 1% AppendPack-8 4.95µs ± 2% name alloc/op Pack-8 6.22kB ± 0% AppendPack-8 5.71kB ± 0% name allocs/op Pack-8 21.0 ± 0% AppendPack-8 20.0 ± 0% Change-Id: I8bb6b07787cf2ba9ef32e1e60a3003a585ec55be Reviewed-on: https://go-review.googlesource.com/45274Reviewed-by: Ian Gudger <igudger@google.com> Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com> Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 26 Oct, 2017 1 commit
-
-
Russ Cox authored
The macOS kernel reliably crashes in a repeated TestRouteMessage. Putting some extra padding into the request buffer avoids the crash. This will do as workaround; the kernel bug will be reported to Apple separately. Fixes golang/go#22456. Change-Id: I789d3d57fbc511016d9f4a3fa7662d6c7642f137 Reviewed-on: https://go-review.googlesource.com/73690 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 24 Oct, 2017 1 commit
-
-
Marcel van Lohuizen authored
Generated from x/text. Significant changes in the interpretation of the Bidi rule as well as sharpening of the leading dot rules, among other things. Issue golang/go#21471 Change-Id: I8649a4090e2bc530aad4412210a3de344fb2eab6 Reviewed-on: https://go-review.googlesource.com/63951 Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Nigel Tao <nigeltao@golang.org>
-
- 23 Oct, 2017 2 commits
-
-
Michael Fraenkel authored
If a server returns a DATA frame while procesing a HEAD request, the client will discard the data. Fixes golang/go#22376 Change-Id: Ief9c17ddfe51cc17f7f6326c87330ac9d8b9d3ff Reviewed-on: https://go-review.googlesource.com/72551 Run-TryBot: Tom Bergan <tombergan@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tom Bergan <tombergan@google.com>
-
Francisco Rojas authored
Fixes golang/go#22322 Change-Id: I1f0c62ce1c247b583de51faef8722d07e627b441 Reviewed-on: https://go-review.googlesource.com/72570Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 20 Oct, 2017 1 commit
-
-
Tom Bergan authored
Currently, we close the connection immediately after sending a GOAWAY frame if all outstanding responses have been completely sent. However, the client may have had requests in-flight at that time which have been queued in the kernel receive buffer. On both Windows and Linux, if the connection is close()'d when the receive buffer is not empty, the kernel sends RST. This has the effect of aborting both sides of the connection, meaning the client may not actually receive all responses that were sent before the GOAWAY. Instead, we should delay calling close() until after the receive buffer has been drained. We don't want to delay indefinitely, which means we need some kind of timeout. Ideally that timeout should be about 1 RTT + epsilon, under the assumption that the client will not send any more frames after receiving the GOAWAY. However, 1 RTT is difficult to measure. It turns out we were already using a 1 second delay in other cases, so we reuse that same delay here. Note that we do not call CloseWrite() to half-close the underlying TLS connection. This seems unnecessary -- GOAWAY is effectively a half-close at the HTTP/2 level. Updates golang/go#18701 (fixes after it's bundled into net/http) Change-Id: I4d68bada6369ba95e5db02afe6dfad0a393c0334 Reviewed-on: https://go-review.googlesource.com/71372 Run-TryBot: Tom Bergan <tombergan@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
-
- 19 Oct, 2017 1 commit
-
-
Joe Kyo authored
Change-Id: I7091af7efe71d46a0f55fd8341afcaa76073adaf Reviewed-on: https://go-review.googlesource.com/71630Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-