- 20 Oct, 2015 3 commits
-
-
Brad Fitzpatrick authored
This changes makes sure we never write to *writeData in the ServeHTTP goroutine until the serve goroutine is done with it. Also, it makes sure we don't transition the stream to the closed state on the final DATA frame concurrently with the write. To fix both, the writeFrameAsync goroutine no longer replies directly back to the ServeHTTP goroutine with the write result. It's now passed to the serve goroutine instead, which looks at the frameWriteMsg to decide how to advance the state machine, then signals the ServeHTTP goroutine with the result, and then advances the state machine. Because advancing the state machine could transition it to closed, which the ServeHTTP goroutine might also be selecting on, make the ServeHTTP goroutine prefer its frameWriteMsg response channel for errors over the stream closure in its select. Various code simplifications and robustness in the process. Tests now pass reliably even with high -count values, -race on/off, etc. I've been unable to make h2load be unhappy now either. Thanks to Tatsuhiro Tsujikawa (Github user @tatsuhiro-t) for the bug report and debugging clues. Fixes golang/go#12998 Change-Id: I441c4c9ca928eaba89fd4728d213019606edd899 Reviewed-on: https://go-review.googlesource.com/16063Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Brad Fitzpatrick authored
Also add a new h2load test, disabled by default. Change-Id: I0fcfdbf38cf86481c6347dd7e0a1daed7d9c7b65 Reviewed-on: https://go-review.googlesource.com/16062Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Brad Fitzpatrick authored
ConfigureServer now returns an error if your config is wrong. It doesn't attempt to fix it for you. Adjust this test accordingly. Change-Id: Ie3de878ff58cef454de0ec9ab1a10459ca0ddd2d Reviewed-on: https://go-review.googlesource.com/16061Reviewed-by: Adam Langley <agl@golang.org>
-
- 19 Oct, 2015 2 commits
-
-
Brad Fitzpatrick authored
Fixes golang/go#12895 Change-Id: I7cf6e63b1bbdf1f4e8974c00bdaed69b74f6db49 Reviewed-on: https://go-review.googlesource.com/15860Reviewed-by: Adam Langley <agl@golang.org>
-
Sameer Ajmani authored
Fixes #11512. Change-Id: Iaf98ec25fb16a2409c1ff7d110afa6477267d3e1 Reviewed-on: https://go-review.googlesource.com/13643Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 16 Oct, 2015 1 commit
-
-
Brad Fitzpatrick authored
This is required to work with the upcoming rewrite of the httptest.Server's connection tracking in https://go-review.googlesource.com/#/c/15151/ which (at least as of patchset 7) doesn't forcefully tear down a StateNew connection during Server.Wait. That might change. In any case, this adds support for ConnState, which users would expect regardless of protocol in a mixed HTTP/1 and HTTP/2 environment. Change-Id: I124aafec29dda123a018935fa306f465ae99cd97 Reviewed-on: https://go-review.googlesource.com/15913Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 14 Oct, 2015 5 commits
-
-
Brad Fitzpatrick authored
Change-Id: I875835875f8f97158f2dc88e508a075929af931e Reviewed-on: https://go-review.googlesource.com/15827Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Fixes golang/go#12905 Change-Id: I73b3041f06ca93ad0e75251ca32f077fa9eafe8d Reviewed-on: https://go-review.googlesource.com/15826Reviewed-by: Arnout Engelen <arnout@bzzt.net> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Andrew Gerrand authored
Change-Id: I043b392053bdf61ef863dfcb083ff6034d9322e7 Reviewed-on: https://go-review.googlesource.com/15840Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Fixes golang/go#12916 Change-Id: I085ebc1d3f851d7c1b689a715c4f2fe85be4608a Reviewed-on: https://go-review.googlesource.com/15821Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Brad Fitzpatrick authored
In general, clean up and simplify the handling of frame writing from handler goroutines. Always select on streams closing, and don't try to pass around and re-use channels. It was too confusing. Instead, reuse channels in a very local manner that's easy to reason about. Thanks to Github user @pabbott0 (who has signed the Google CLA) for the initial bug report and test cases. Fixes bradfitz/http2#45 Change-Id: Ib72a87cb6e33a4bb118ae23d765ba594e9182ade Reviewed-on: https://go-review.googlesource.com/15820Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 13 Oct, 2015 4 commits
-
-
Brad Fitzpatrick authored
There was a design problem earlier where the serve goroutine assumed that the readFrame goroutine could return only connection-level errors, but the readFrames goroutine (and the underlying Framer) assumed it could return stream-level errors (type StreamError) and have them handled as stream errors in the layers above. That's how it should have been, and what this CL does. Now readFrames returns both the Frame and error from ReadFrames together as a pair, and an error isn't necessarily fatal to the connection. Fixes golang/go#12733 Fixes bradfitz/http2#53 Change-Id: If4406ceaa019886893d3c61e6bfce25ef74560d3 Reviewed-on: https://go-review.googlesource.com/15735Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
Brad Fitzpatrick authored
Return an error instead. Fixes bradfitz/http2#56 Change-Id: I3d1e80a214a8635932479943f0ef9610ee02b233 Reviewed-on: https://go-review.googlesource.com/15738Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Brad Fitzpatrick authored
In the first attempt to enforce the SETTINGS_MAX_HEADER_LIST_SIZE (https://go-review.googlesource.com/15751), the enforcement happened in the hpack decoder and the hpack decoder returned errors on Write and Close if the limit was violated. This was incorrect because the decoder is used over the life of the connection and all subsequent requests and could therefore get out of sync. Instead, this moves the counting of the limit up to the http2 package in the serverConn type, and replaces the hpack counting mechanism with a simple on/off switch. When SetEmitEnabled is set false, the header field emit callbacks will be suppressed and the hpack Decoder will do less work (less CPU and garbage) if possible, but will still return nil from Write and Close on valid input, and will still stay in sync it the stream. The http2 Server then returns a 431 error if emits were disabled while processing the HEADER or any CONTINUATION frames. Fixes golang/go#12843 Change-Id: I3b41aaefc6c6ee6218225f8dc62bba6ae5fe8f2d Reviewed-on: https://go-review.googlesource.com/15733Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Brad Fitzpatrick authored
Fixes golang/go#12742 Change-Id: I04d65b0c68ccb5da5ee90650c7b0593fbdb1d470 Reviewed-on: https://go-review.googlesource.com/15736Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 12 Oct, 2015 1 commit
-
-
Brad Fitzpatrick authored
Minor performance improvement, since len(staticTable) is then a constant at compile time. Change-Id: Ie51ecc985aa3f40d50f0a7d1ab6ac91738f696d5 Reviewed-on: https://go-review.googlesource.com/15731Reviewed-by: Dmitri Shuralyov <shurcool@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 11 Oct, 2015 1 commit
-
-
Brad Fitzpatrick authored
Thanks to Andy Bursavich for the example attack. Pair programmed with Dmitri Shuralyov. Fixes golang/go#12843 Change-Id: Ic412c9364b37a10e5164232aa809b956874fae08 Reviewed-on: https://go-review.googlesource.com/15751Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 08 Oct, 2015 1 commit
-
-
Brad Fitzpatrick authored
There are already tests which cover the behavior. This is simply moving where it happens. I'm not adding new tests to cover the very bad behavior because once the rest of the bug is fixed, it won't be possible to observe anyway. But even for smallish inputs, this is faster. Part of golang/go#12843 Change-Id: I7d69f2409e2adb4a01d101a915e09cf887b03f21 Reviewed-on: https://go-review.googlesource.com/15601Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 06 Oct, 2015 1 commit
-
-
Burcu Dogan authored
Change-Id: I2b0b87aed4ff5c338b0ae09b63f55411322a871e Reviewed-on: https://go-review.googlesource.com/15436Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 02 Oct, 2015 3 commits
-
-
David Symonds authored
Change-Id: Idd45c1be493f4535d73323fc2feda5efff45763e Reviewed-on: https://go-review.googlesource.com/15243Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Mikio Hara authored
Change-Id: I8bd9d181c4c2e8c4ea01342a306acdca69eabf18 Reviewed-on: https://go-review.googlesource.com/15085Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
Change-Id: I8f41ef0d3eefecb26d073e21bc1d5b7b6a51d259 Reviewed-on: https://go-review.googlesource.com/15053Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 27 Sep, 2015 3 commits
-
-
Arnout Engelen authored
Change-Id: I3d3905adab74a83c9d7d72c829f6686b514f3aaf Reviewed-on: https://go-review.googlesource.com/15060Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tamir Duberstein authored
This makes it correct for IPv6 too. Change-Id: Ide2fc12ed97974b6abbafa66c4b83d0086c4e87c Reviewed-on: https://go-review.googlesource.com/15030Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Change-Id: I55d6ad683b8021722fec8b42b2a8aa0a1883cb96 Reviewed-on: https://go-review.googlesource.com/15052Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 24 Sep, 2015 4 commits
-
-
Brad Fitzpatrick authored
Change-Id: I95471bf40cf5b0ceb2dfc01d4c831acb65265719 Reviewed-on: https://go-review.googlesource.com/14950Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
Brad Fitzpatrick authored
This adds the http2 directory from github.com/bradfitz/http2 (Merge reviewed by David Symonds <dsymonds@golang.org>)
-
Brad Fitzpatrick authored
-
Brad Fitzpatrick authored
In prep for move to golang.org/x/net/*.
-
- 03 Sep, 2015 1 commit
-
-
Federico Simoncelli authored
StripPrefix in the webdav package strips prefixes from requests (including the Destination headers) but cannot handle the paths in the xml entities responses which are confusing some clients (e.g. cadaver). This patch replaces StripPrefix with Prefix in the Handler to handle prefixes both in the requests and in the xml entities responses. Change-Id: I67062e30337b2ae422c82a2f927454f5a8a00e34 Reviewed-on: https://go-review.googlesource.com/13857Reviewed-by: Nigel Tao <nigeltao@golang.org>
-
- 29 Aug, 2015 1 commit
-
-
Michael Gehring authored
Fixes golang/go#12387 Change-Id: Iecc42d9f809bed10036d1c3af8838c2fbf7ea93d Reviewed-on: https://go-review.googlesource.com/14014Reviewed-by: David Symonds <dsymonds@golang.org>
-
- 24 Aug, 2015 2 commits
-
-
David Symonds authored
These expose the main HTML rendering functions of this package for use with alternate HTTP muxes and on alternate paths. Fixes golang/go#12195. Change-Id: I679583fd26116bc83ff551a5d2a1d73ffa1e01f0 Reviewed-on: https://go-review.googlesource.com/13825Reviewed-by: Dave Day <djd@golang.org>
-
David Symonds authored
This will make it easier to serve /debug/requests off a different path. This is groundwork towards addressing golang/go#12195. Change-Id: If29a4c329609df1d5b09a3a88b8bdf1f8b622e49 Reviewed-on: https://go-review.googlesource.com/13824Reviewed-by: Dave Day <djd@golang.org>
-
- 17 Aug, 2015 3 commits
-
-
Mikio Hara authored
Updates golang/go#12163. Change-Id: I91c57e76be680dea8b60196ad07f8c7ed093e008 Reviewed-on: https://go-review.googlesource.com/13655Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
Updates golang/go#12163. Change-Id: I1cd3b6324eb37d7a2285683590acd188758e7d90 Reviewed-on: https://go-review.googlesource.com/13654Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
Also fixes ping tests. Latest Linux kernels prohibit to access ICMPv6 properties with non-privileged sockets. Fixes golang/go#12163. Change-Id: I439b41556e8d4c2f3a9f725131267469e08c9599 Reviewed-on: https://go-review.googlesource.com/13653Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 13 Aug, 2015 1 commit
-
-
Mikio Hara authored
When making a request to an IPv6 address with a zone identifier, for exmaple [fe80::1%en0], RFC 6874 says HTTP clients must remove the zone identifier "%en0" before writing the request for security reason. This change removes any IPv6 zone identifer attached to URI in the Host header field in requests. See golang/go#9544. Change-Id: Ie5d18a0bc5f2768a95c59ec2b159ac0abdf685e8 Reviewed-on: https://go-review.googlesource.com/13296Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 10 Aug, 2015 1 commit
-
-
Sameer Ajmani authored
An event log is typically associated with a long-lived object, like an RPC connection. Printf calls record events; Errorf calls record events marked as errors. The HTTP endpoint /debug/events organizes event logs by family (usually the Go type name) and by time-since-last-error. The expanded view shows recent events in the log and the call stack where the event log was created. Change-Id: I3461e0d63f39ce6495e16300299048e572b3aa19 Reviewed-on: https://go-review.googlesource.com/12025Reviewed-by: David Symonds <dsymonds@golang.org>
-
- 05 Aug, 2015 1 commit
-
-
Chris Broadfoot authored
ctxhttp provides helper functions for performing context-aware HTTP requests. Fixes golang/go#11904 Change-Id: Ib9d2fef48953dbb52f0a70e1ed49ea7fe12b7801 Reviewed-on: https://go-review.googlesource.com/12755Reviewed-by: David Symonds <dsymonds@golang.org> Reviewed-by: Aaron Jacobs <jacobsa@google.com> Reviewed-by: Dave Day <djd@golang.org>
-
- 04 Aug, 2015 1 commit
-
-
Mikio Hara authored
This change prevents Read from failing with io.EOF, ErrNotImplemented on exchanging control frames such as ping and pong. Fixes golang/go#6377. Fixes golang/go#7825. Fixes golang/go#10156. Change-Id: I600cf493de3671d7e3d11e2e12d32f43928b7bfc Reviewed-on: https://go-review.googlesource.com/13054Reviewed-by: Andrew Gerrand <adg@golang.org>
-