- 06 Apr, 2016 1 commit
-
-
Brad Fitzpatrick authored
Fixes golang/go#14214 Change-Id: I474af4735e2135d787e948220a8fcdbba73a2b25 Reviewed-on: https://go-review.googlesource.com/21534Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 05 Apr, 2016 2 commits
-
-
Sam Whited authored
Change-Id: I1b0e8812ca5b2e3ca72948d5414d569879e54f35 Reviewed-on: https://go-review.googlesource.com/21461Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Brad Fitzpatrick authored
See https://golang.org/cl/20346 Updates golang/go#14660 Change-Id: Ia974e70cdcb240ae1df0018a07595c4d1dcd422a Reviewed-on: https://go-review.googlesource.com/20347Reviewed-by: Sameer Ajmani <sameer@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
- 03 Apr, 2016 1 commit
-
-
Roland Shoemaker authored
Adds Keep-Alive to the list of ignored headers in encodeHeaders as required in the HTTP/2 spec (section 8.1.2.2) and adds a test to check this. Fixes golang/go#15085 Change-Id: Ie4624680c5de1f13eb94fa58a2d5d67a02634df3 Reviewed-on: https://go-review.googlesource.com/21482Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 31 Mar, 2016 3 commits
-
-
David Anderson authored
The instruction itself doesn't care what the bits it's twiddling represents, even though the it was introduced to more efficiently manipulate IPv4 packets. Change-Id: Ie65a6df4041ad2090060636ccf7128680fcf75b7 Reviewed-on: https://go-review.googlesource.com/21244Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
Mikio Hara authored
Change-Id: I87887ea03c36ca7d26e1ab2cb55d723611c942a8 Reviewed-on: https://go-review.googlesource.com/21354Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
Change-Id: I367d38bca99ede07aa0cf697547c5cb43ce4e164 Reviewed-on: https://go-review.googlesource.com/21353Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 28 Mar, 2016 5 commits
-
-
Brad Fitzpatrick authored
Backtick is my screen metakey, so this got lost in a copy/paste at the backtick symbol. Change-Id: Ia3e7bf5d2819ea83ff6cc86cc3b6210e3f279eb0 Reviewed-on: https://go-review.googlesource.com/21193Reviewed-by: David Symonds <dsymonds@golang.org>
-
David Anderson authored
Change-Id: Ied9b2589b4aa5cb445dd368864df047c84848a95 Reviewed-on: https://go-review.googlesource.com/21217Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
David Anderson authored
Change-Id: I2fcb07bdc104c488aa61a6c6b6ee8797e60e868a Reviewed-on: https://go-review.googlesource.com/21216Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
David Anderson authored
The code ends up slightly longer, but the decoding is more consistent from one instruction class to another, so hopefully it's easier to make sense of it. Change-Id: Ia22c2ebb0865536da0c3dac6876bdb0b20075f04 Reviewed-on: https://go-review.googlesource.com/21215Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com> Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Anderson authored
The package currently implements the operations defined by https://www.kernel.org/doc/Documentation/networking/filter.txt , which comprises the base BPF virtual machine plus the Linux kernel's extension opcodes. Updates golang/go#14982 Change-Id: Iafb43d80e067040e60465a9bfb7d5f2ca90cc2ae Reviewed-on: https://go-review.googlesource.com/21212Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
- 25 Mar, 2016 1 commit
-
-
Brad Fitzpatrick authored
Git rev e7da8eda (CL 20542) introduced an optimization to reuse the 64k request body buffers across multiple requests. But ServeHTTP handlers could retain them too long and cause races. Temporarily revert the main part of that CL until a proper fix is in. Updates golang/go#14960 Updates grpc/grpc-go#604 Change-Id: I28450e797a1d3122868214700b6ef345a0a1a47c Reviewed-on: https://go-review.googlesource.com/21160Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 24 Mar, 2016 1 commit
-
-
Brad Fitzpatrick authored
The Google GFE replies to HEAD requests with the END_STREAM bit in an empty DATA frame, not in the response HEADERS. The Go Transport code mistook this to mean the Content-Length was real. Worked around in: https://github.com/GoogleCloudPlatform/gcloud-golang/commit/645322e7db5d89c44d1f3925028479ac7dbc8680 Reported internally in b/27820181. Change-Id: Id31a047e2277d7d90560fca264919e239ec76d74 Reviewed-on: https://go-review.googlesource.com/21061Reviewed-by: Dave Day <djd@golang.org>
-
- 22 Mar, 2016 2 commits
-
-
Brad Fitzpatrick authored
benchmark old ns/op new ns/op delta BenchmarkServer_GetRequest-2 259453 256050 -1.31% benchmark old allocs new allocs delta BenchmarkServer_GetRequest-2 24 22 -8.33% benchmark old bytes new bytes delta BenchmarkServer_GetRequest-2 1599 1532 -4.19% Change-Id: Ieb11a3bd4c752567e0401bcc5e77e027cfb8063c Reviewed-on: https://go-review.googlesource.com/20999Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Brad Fitzpatrick authored
benchmark old ns/op new ns/op delta BenchmarkServer_GetRequest-2 269540 259453 -3.74% benchmark old allocs new allocs delta BenchmarkServer_GetRequest-2 25 24 -4.00% benchmark old bytes new bytes delta BenchmarkServer_GetRequest-2 1613 1599 -0.87% Change-Id: I33609d8fbe2f81e32095fac8b89ddd55592e583f Reviewed-on: https://go-review.googlesource.com/20998Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 21 Mar, 2016 1 commit
-
-
Brad Fitzpatrick authored
Moves test cases into the test where they're used, to remove distractions when profiling unrelated tests. Also this is my style preference, to remove globals and reduce the scope of variables. Change-Id: Ie9cd41b16aad9acf5e210f1fb6f19a7fce52180d Reviewed-on: https://go-review.googlesource.com/20996Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 20 Mar, 2016 1 commit
-
-
David Symonds authored
cancelCtx has an embedded sync.Mutex. This change causes an extra allocation when creating a new timerCtx via WithDeadline, but that seems minor when compared with better locking discipline. If it turns out to be a problem, the whole cancelCtx struct can be flattened into timerCtx. Addresses part of golang/go#14839. Change-Id: Ie86ed1b63592b521aefde747d5fafcd49ac18178 Reviewed-on: https://go-review.googlesource.com/20840Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 15 Mar, 2016 1 commit
-
-
Dave Day authored
Change-Id: Ia61f61d0b9395f383ff622f2d606dcd499f57776 Reviewed-on: https://go-review.googlesource.com/20588Reviewed-by: David Symonds <dsymonds@golang.org>
-
- 10 Mar, 2016 1 commit
-
-
Brad Fitzpatrick authored
It was allocating 64k of garbage per request. benchmark old ns/op new ns/op delta BenchmarkServer_GetRequest-2 234445 236751 +0.98% BenchmarkServer_PostRequest-2 284443 263019 -7.53% benchmark old allocs new allocs delta BenchmarkServer_GetRequest-2 25 25 +0.00% BenchmarkServer_PostRequest-2 31 30 -3.23% benchmark old bytes new bytes delta BenchmarkServer_GetRequest-2 1540 1540 +0.00% BenchmarkServer_PostRequest-2 67658 1800 -97.34% Change-Id: I9deee0ad2fddecd65c82e40782f61da0217735fc Reviewed-on: https://go-review.googlesource.com/20542Reviewed-by: Blake Mizerany <blake.mizerany@gmail.com> Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 09 Mar, 2016 2 commits
-
-
Sam Whited authored
Specifically state that it is safe to call methods on Conn from multiple goroutines in the docs. Fixes #6692 Change-Id: I1b0e8812ca5b2e3ca72948c5404d569879e54f34 Reviewed-on: https://go-review.googlesource.com/20455Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Mikio Hara authored
Change-Id: I5ab995f50ff43cb88d670f52464d6f0e0f188275 Reviewed-on: https://go-review.googlesource.com/20460Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 06 Mar, 2016 1 commit
-
-
Brad Fitzpatrick authored
Change-Id: If36de4de2c4fac6767aa5490e6f3d8c15531dda6 Reviewed-on: https://go-review.googlesource.com/20275Reviewed-by: Dave Day <djd@golang.org>
-
- 05 Mar, 2016 1 commit
-
-
Jacob Hoffman-Andrews authored
Previously this took 20 minutes, now it takes 2-4 seconds. Changes: - Iterate over prefix length, from longest to shortest. - Build a map of prefixes and reuse it to avoid one loop. - When removing simple substrings, sort by length and only consider strings long enough to be worth checking. Saves 600ms out of 800ms. - Removed the option to generate uncrushed table. - Fix an unhandled error in n.walk(w, assignIndexes) Change-Id: I321d2c2bd18f4918479500f3c61d5e59ee173f3d Reviewed-on: https://go-review.googlesource.com/20029Reviewed-by: Nigel Tao <nigeltao@golang.org>
-
- 04 Mar, 2016 1 commit
-
-
Nigel Tao authored
$ cd golang.org/x/net/publicsuffix/ $ go run gen.go -version "publicsuffix.org's public_suffix_list.dat, git revision bade64c (2016-03-01)" -test >table_test.go $ go run gen.go -version "publicsuffix.org's public_suffix_list.dat, git revision bade64c (2016-03-01)" >table.go Change-Id: Ib9ecfdab44dad630510532b08c2d4e54ea94b67a Reviewed-on: https://go-review.googlesource.com/20183Reviewed-by: David Symonds <dsymonds@golang.org>
-
- 25 Feb, 2016 2 commits
-
-
Brad Fitzpatrick authored
Change-Id: Ida47c3feab7bfb0f12bf832953e16d167e6547dd Reviewed-on: https://go-review.googlesource.com/19917Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Brad Fitzpatrick authored
Fixes golang/go#14501 Change-Id: Ibaa7fb1fff404c62c35bb7c63f4a442e4fc0610d Reviewed-on: https://go-review.googlesource.com/19918Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 23 Feb, 2016 3 commits
-
-
Dmitri Shuralyov authored
I believe it is more idiomatic to use exit code 2 for flag parsing errors and invalid usage cases. It's also not needed to do os.Exit inside usage since flag handling code does it anyway; usage should only print usage text. Change-Id: I0fe2047e3fd01489d32dfb8fde49ce7829439687 Reviewed-on: https://go-review.googlesource.com/19774Reviewed-by: Blake Mizerany <blake.mizerany@gmail.com>
-
Mikio Hara authored
Change-Id: I88b1fac3419f3e655a11cb22050fcd9a9a6c6616 Reviewed-on: https://go-review.googlesource.com/19786Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
HEADERS and CONTINUATION frames are special in that they must appear contiguous on the wire and there are lots of annoying details to verify while working through its state machine, including the handling of hpack header list size limits and DoS vectors. We now have three implementations of this merging (Server, Transport, and grpc), and grpc's is not complete. The Transport's was also partially incomplete. Move this up to the Framer (opt-in, for compatibility) and remove the support from the Server and Transport. I can fix grpc later to use this. Recommended reviewing order: * hpack.go exports the HeaderField.Size method and adds an IsPseudo method. * errors.go adds some new unexported error types, for testing. * frame.go adds the new type MetaHeadersFrame. * frame.go adds new fields on Framer for controlling how ReadFrame behaves * frame.go Framer.ReadFrame now calls the new Framer.readMetaFrame method * frame_test.go adds a bunch of tests. these are largely redundant with the existing tests which were in server and transport before. They really belong with frame_test.go, but I also don't want to delete tests in a CL like this. I probably won't remove them later either. * server.go and transport.go can be reviewed in either order at this point. Both are the fun part of this change: deleting lots of hairy state machine code (which was redundant in at least 6 ways: server headers, server trailers, client headers, client trailers, grpc headers, grpc trailers...). Both server and transport.go have the general following form: - set Framer.ReadMetaHeaders - stop handling *HeadersFrame and *ContinuationFrame; handle *MetaHeadersFrame instead. - delete all the state machine + hpack parsing callback hell The diffstat numbers look like a wash once you exclude the new tests, but this pays for itself by far when you consider the grpc savings as well, and the increased simplicity. Change-Id: If348cf585165b528b7d3ab2e5f86b49a03fbb0d2 Reviewed-on: https://go-review.googlesource.com/19726Reviewed-by: Blake Mizerany <blake.mizerany@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
- 17 Feb, 2016 3 commits
-
-
Mikio Hara authored
Also makes use of encoding/binary package. Change-Id: I0faf7d55bf3340e84b7d7cf1c77ab3886c728a07 Reviewed-on: https://go-review.googlesource.com/19533 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 makes use of encoding/binary package. Change-Id: Id41ea874487f88a3de9fa28b613a77eb66643cc8 Reviewed-on: https://go-review.googlesource.com/19534 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 makes use of encoding/binary package. Change-Id: Ia771290aaccb936fbb7052abaaf96290a9ed4644 Reviewed-on: https://go-review.googlesource.com/19535 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 13 Feb, 2016 1 commit
-
-
Brad Fitzpatrick authored
This old code was buggy: type gzipReader struct { body io.ReadCloser // underlying Response.Body zr io.Reader // lazily-initialized gzip reader } func (gz *gzipReader) Read(p []byte) (n int, err error) { if gz.zr == nil { gz.zr, err = gzip.NewReader(gz.body) if err != nil { return 0, err } } return gz.zr.Read(p) } If a Read on a gzipped Response.Body (of type *http2.gzipReader) resulted in gzip.NewReader returning an error, gzipReader assigned a *gzip.Reader-typed nil value to the gz.zr interface value. On a subsequent Read, gz.zr would not be equal to ==, because it was actually equal to (type *gzip.Reader, nil), and then zr.Read would call (*gzip.Reader).Read with a nil receiver and explode. Debugged internally. (http://go/http2gzipbug) Change-Id: Icba040ace8ffac3536e5e7ade6695c7660838ca1 Reviewed-on: https://go-review.googlesource.com/19483Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
- 11 Feb, 2016 1 commit
-
-
Nigel Tao authored
Also add more detail to some code-gen error messages. Change-Id: I776609435d3b27d2fffd48046f98fb0b098451c5 Reviewed-on: https://go-review.googlesource.com/19440Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 05 Feb, 2016 2 commits
-
-
Mikio Hara authored
Change-Id: I3798117511b4c9d9033a3b5dbefbae34d7bec639 Reviewed-on: https://go-review.googlesource.com/19244Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Accept common things that users might try to do to be helpful (managed by net/http anyway, and previously legal or at best ignored), like Connection: close Connection: keep-alive Transfer-Encoding: chunked But reject all other connection-level headers, per http2 spec. The Google GFE enforces this, so we need to filter these before sending, and give users a better error message for the ones we can't safely filter. That is, reject any connection-level header that we don't know the meaning of. This CL also makes "Connection: close" mean the same as Request.Close, and respects that as well, which was previously ignored in http2. Mostly tests. Updates golang/go#14227 Change-Id: I06e20286f71e8416149588e2c6274a3fce68033b Reviewed-on: https://go-review.googlesource.com/19223Reviewed-by: Andrew Gerrand <adg@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 03 Feb, 2016 2 commits
-
-
Brad Fitzpatrick authored
Fixes golang/go#12737 Updates golang/go#14141 Change-Id: I552b603b63a7c87d7fcdb4eb09f96ab9fd0ec0aa Reviewed-on: https://go-review.googlesource.com/19176Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Updates golang/go#14204 Change-Id: Id2598c77e2677a50988c00adc8751a9b87751202 Reviewed-on: https://go-review.googlesource.com/19159Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 02 Feb, 2016 1 commit
-
-
Ricardo Padilha authored
Change-Id: I89cb0ac7b7066e557e6f0c2abc2f9edf589017d0 Reviewed-on: https://go-review.googlesource.com/19140 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-