Commit Graph

1377 Commits

Author SHA1 Message Date
Brad Fitzpatrick
04ba8c85dd webdav: remove Go 1.6 support, use std context
Fixes golang/go#21364

Change-Id: Ibfc6f5001d7038e4efd1f3fe8fc6d3fdded85551
Reviewed-on: https://go-review.googlesource.com/c/148438
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-11-08 05:43:10 +00:00
Brad Fitzpatrick
ccbb57fb48 trace: remove Go 1.6 support
Change-Id: I07355ffab9e0e9437dc43cb99670736fe65bc25a
Reviewed-on: https://go-review.googlesource.com/c/148437
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2018-11-08 05:43:00 +00:00
Ruslan Nigmatullin
1c5f79cfb1 http2: don't leak streams on broken body
Updates golang/go#27208

Change-Id: I5d9a643f33d27d33b24f670c98f5a51aa6000967
GitHub-Last-Rev: 3ac4a573b6
GitHub-Pull-Request: golang/net#18
Reviewed-on: https://go-review.googlesource.com/c/132715
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-11-07 23:42:26 +00:00
Michael Stapelberg
a544f70c90 internal/socket: update zoneCache on cache misses to cover appearing interfaces
Updates golang/go#28535

Change-Id: Id653b21b4d893cc8b6b9a74b129d1ce9b7e26a9f
Reviewed-on: https://go-review.googlesource.com/c/147739
Reviewed-by: Mikio Hara <mikioh.public.networking@gmail.com>
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
2018-11-07 09:39:36 +00:00
Mikio Hara
10aee18199 icmp, ipv4, ipv6: re-adjust build constraints
Also updates package documentation for AIX.

Change-Id: I4809a334f0a4b8f3fb5345749477394b8f3e7546
Reviewed-on: https://go-review.googlesource.com/c/147678
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-11-06 06:57:22 +00:00
Mikio Hara
ab400d30eb http2/h2i: re-adjust build constraints
On Solaris, the MakeRaw and Restore functions of the
x/crypto/ssh/terminal package have been implemented, but on upcoming
platforms such as AIX, Fuchsia and Hurd still have no implementation.

Change-Id: I253249376802273f0160bf3ff1062a66e07b280f
Reviewed-on: https://go-review.googlesource.com/c/147677
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-11-06 04:01:32 +00:00
uhei
c10e9556a7 icmp: fix InterfaceIdent.Index handling
RFC 7223, Section 3 defines 32 bits for if-index.
RFC 8335, Section 2.1 defines
"If the Interface Identification Object identifies the probed
interface by index, the length is equal to 8 and the payload contains
the if-index [RFC7223]."
The object should be comprised of a 4-byte object header and a 4-byte interface index.

Fixes golang/go#28530

Change-Id: Ib3ac729b7ec738a90a8c76ef984da0d5b28fa9c9
GitHub-Last-Rev: eba6714ed4
GitHub-Pull-Request: golang/net#23
Reviewed-on: https://go-review.googlesource.com/c/146637
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
Reviewed-by: Mikio Hara <mikioh.public.networking@gmail.com>
2018-11-02 09:11:32 +00:00
Mikio Hara
b7e296877c Revert "icmp: fix ExtendedEchoRequest extension object"
This reverts commit e11730110b.

Reason for revert: The reverted test case is one of typical wrong wire
format test cases. The exposed API intentionally doesn't provide any
extenion object validation because the API is also used to construct
wire format compliance test tools. The API is extesion object-agnostic
and should be able to transmit and receive payload containing extension
objects in wrong wire format. Please preserve such test cases for now.

If you want to drop such test case, please add 1) extension object
validation, 2) a control knob for skipping validation, then drop all of
them.

Change-Id: I5c488c95523488e511e7a91e29a2f24f08448415
Reviewed-on: https://go-review.googlesource.com/c/146877
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2018-11-02 05:01:34 +00:00
uhei
e11730110b icmp: fix ExtendedEchoRequest extension object
RFC8335 [1] Sec 2: "When applied to the ICMP
Extended Echo Request message, the ICMP Extension Structure MUST
contain exactly one instance of the Interface Identification Object."

The InterfaceIdent by name object seems to be a copy/paste issue.

[1]: https://www.rfc-editor.org/rfc/rfc8335.txt

Change-Id: I1ef5f38382ebede0cb3ee792892673f6c2b39672
GitHub-Last-Rev: 73f963c5dc
GitHub-Pull-Request: golang/net#24
Reviewed-on: https://go-review.googlesource.com/c/146638
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-11-01 16:02:48 +00:00
Brad Fitzpatrick
22700d5518 http2: remove support for Go 1.8 and earlier
Go's policy is to only support the past two releases (which is
currently Go 1.11 and Go 1.10). But because App Engine was stuck on Go
1.6 and Go 1.8 for so long, we kept kinda supporting Go 1.6 anyway,
even though we didn't actively test it with any CI system.

But that led to code getting disgusting and full of too many
+build-tagged files and indirection, as this change shows.

So, remove Go 1.8, Go 1.7, and Go 1.6 support. We still "support" Go
1.9 for now, even though it's also not actively tested.

Fixes golang/go#26302

Change-Id: I4aa5793173e50ffcd67be52a464492ca48fc9a23
Reviewed-on: https://go-review.googlesource.com/c/145677
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2018-11-01 15:51:06 +00:00
Igor Zhilianin
c44066c5c8 http2: fix typos
Change-Id: Ifa39718a790a7350a0c8f23d21356d42b15e0668
GitHub-Last-Rev: 63d19182f0
GitHub-Pull-Request: golang/net#22
Reviewed-on: https://go-review.googlesource.com/c/145357
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-10-29 04:48:18 +00:00
chigotc
9b4f9f5ad5 internal/nettest: add AIX operating system
This commit adds AIX operating system to internal/nettest package.

It also disables unixpacket network.

Change-Id: Ie1a0b5c02d41ede7297c3706f6967be3438321a5
Reviewed-on: https://go-review.googlesource.com/c/144077
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-10-23 16:26:49 +00:00
Volker Dobler
04a2e542c0 publicsuffix: update table to latest list from publicsuffix.org
Update the list to revision 6f2b9e75eaf65bb75da83677655a59110088ebc5
(2018-10-03T13:34:55Z).

Change-Id: Ibd1b55075213dc98d751be9d7f6e4e3bce3ddf05
Reviewed-on: https://go-review.googlesource.com/c/142917
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-10-17 19:39:50 +00:00
Arthur Fabre
49bb7cea24 bpf: support JumpIf on RegX instead of K
Add a JumpIfX instruction which implements conditional jumps using
RegA and RegX. This is in addition to the pre-existing JumpIf
instruction which uses RegA and K.

This instruction / addressing mode is not mentionned in the original BPF
paper, but is supported by tools like bpf_asm, and has recently been
added to the kernel's filter.txt.

Simplify some of the parsing logic, and add a separate helper for
checking for "fake" JumpIfs.

Add JumpIfX support to the BPF vm.

Update testdata with JumpIfX instructions, and add tests
for both the assembler/disassembler and vm.

Fixes golang/go#27814

Change-Id: I0c3f6ac7eb5b4cd4d9c5af8784ee2e8d25195a0a
GitHub-Last-Rev: 39a88165b2
GitHub-Pull-Request: golang/net#20
Reviewed-on: https://go-review.googlesource.com/c/136895
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-10-11 14:41:30 +00:00
Mikio Hara
146acd28ed route: don't run NET_RT_IFLIST vs. NET_RT_IFLISTL test in 386 emulation (again)
We are no longer able to use the kernel bug for detecting the execution
of 386 emulation on 11.2-RELEASE or above kernels. This change uses a
variable that holds the execution mode detected in init instead.

Change-Id: Ib6afdbc40ae1feb8caf040c64c4b01971efc6325
Reviewed-on: https://go-review.googlesource.com/c/139917
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-10-05 03:54:20 +00:00
Mikio Hara
68fc911561 route: re-adjust routing message alignment for FreeBSD 386 emulation
On 11.2-RELEASE or above FreeBSD kernels, the breakage of routing
message alignment for 386 emulation (see COMPAT_FREEBSD32 in
sys/net/rtsock.c) is fixed. This change makes packages in the x/net
repository work regardless of the kernel fix.

Change-Id: Ie71cc7dfb842c66225f96d1fb0e8cc5de7c47015
Reviewed-on: https://go-review.googlesource.com/c/139577
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-10-04 19:43:19 +00:00
Kunpei Sakai
f5e5bdd778 html: remove unnecessary namespace checking
Change-Id: I03ebb4369389262b842001e18d0594fd71b19f44
Reviewed-on: https://go-review.googlesource.com/c/138797
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-10-03 01:32:48 +00:00
Jongmin Kim
4dfa2610cd all: fix typos in comments
Change-Id: Ic1771d3ea0e26e02f71d5f4d1d458eb93a2c016d
Reviewed-on: https://go-review.googlesource.com/137695
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-26 15:47:20 +00:00
Kunpei Sakai
f04abc6bdf html: add missing special elements for <svg> and <math>
See: https://html.spec.whatwg.org/multipage/parsing.html#special

Change-Id: Ief3f0c04d2c7530a44221cb8fa2e22dd6d8b8427
Reviewed-on: https://go-review.googlesource.com/136876
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-09-25 07:20:08 +00:00
Kunpei Sakai
cf3bd585ca html: don't set im if <template> doesn't have HTML namespace
If there are nested <template> elements and the <template> node isn't in HTML namespace,
couldn't continue to parse documents correctly.
By this patch, it makes the <template> which is in math namespace be skipped on
resetting insertion mode.

Fixes golang/go#27702

Change-Id: I6eacdb98fe29eb3c61781afca5bc4d83e72ba4ed
Reviewed-on: https://go-review.googlesource.com/136875
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-09-25 07:13:36 +00:00
Kunpei Sakai
2f5d238892 html: avoid panic even if unconsidered <isindex> and <template> combination
The <isindex> element has been removed from the spec so that the
<template> element doesn't cover it.
To avoid panic, this commit adds ignoring code as a workaround.

Fixes golang/go#27704

Change-Id: I847391389285df2fc0eb6a795f8c93b481cdebac
Reviewed-on: https://go-review.googlesource.com/136575
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-09-21 00:03:56 +00:00
Mikio Hara
26e67e76b6 internal/socks: fix socket descriptor leakage in Dialer.Dial
Fixes golang/go#27630.

Change-Id: Id44ade435733ffcd2fc8159ea9ea3287baadf97a
Reviewed-on: https://go-review.googlesource.com/134755
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-09-11 22:03:05 +00:00
Nigel Tao
161cd47e91 html: add more comments to Parse and ParseFragment
They implement the HTML5 parsing algorithm, which is very complicated.

Fixes golang/go#26973

Change-Id: I83a5753ab00fe84f73797fcecd309306d9f24819
Reviewed-on: https://go-review.googlesource.com/133695
Reviewed-by: Kunpei Sakai <namusyaka@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-06 23:31:01 +00:00
Kunpei Sakai
8a410e7b63 html: fix wrong comparison in foster parenting algorithm
Fixes golang/go#23071

Change-Id: I383e13bfd87e32ffb775dff54c46b66b090e5017
Reviewed-on: https://go-review.googlesource.com/131475
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-08-26 01:23:51 +00:00
Kunpei Sakai
4bcd98cce5 html: copy passed tests from chromium
Updates golang/go#23071

Change-Id: I1fdf3fe8c94efdf3c4bf9c39900468381159a032
Reviewed-on: https://go-review.googlesource.com/131178
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-24 15:20:47 +00:00
Kunpei Sakai
faa378e6db html: handle end-of-file cases correctly
Updates golang/go#23071

Change-Id: I02a61109b5738759a9ee3e448981778de7d0ff62
Reviewed-on: https://go-review.googlesource.com/130795
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-08-24 04:51:31 +00:00
Brad Fitzpatrick
922f4815f7 http2: reduce init-time work & allocations
Updates golang/go#26775

Change-Id: Iea95ea07bb0fed42410efb4e8420d8e9a17704fe
Reviewed-on: https://go-review.googlesource.com/127664
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-08-21 02:39:52 +00:00
Kunpei Sakai
aaf6012214 html: remove special procedure for <template> in frameset im
See more details: https://bugs.chromium.org/p/chromium/issues/detail?id=829668

Updates golang/go#23071

Change-Id: Ib9c963269f814c3f21d3784754729df57dcc8f90
Reviewed-on: https://go-review.googlesource.com/123776
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-08-16 10:28:01 +00:00
Kunpei Sakai
c394268923 html: don't ignore token when current token is not <template>
Updates golang/go#23071

Change-Id: I36b0ee58f61b7de25730e0fb082eeb7ef2787594
Reviewed-on: https://go-review.googlesource.com/123920
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-08-11 02:16:10 +00:00
Mikio Hara
f9ce57c11b icmp: clarify the format used by raw ICMP socket
On BSD variaints, for some historical reason, the data format used by raw
ICMP socket may differ from the IPv4 wire format and the format used by
raw IP socket. This change clarifies that input of ParseIPv4Header must
conform to the raw ICMP socket format.

Change-Id: I7288eccaaae0662d0437794098c8f7fc4a55d81e
Reviewed-on: https://go-review.googlesource.com/128216
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-08-08 00:41:15 +00:00
Mikio Hara
b6095f65a0 ipv4: clarify the format used by raw IP socket
On BSD variants, for some historical reason, the data format used by raw
IP socket may differ from the IPv4 wire format. This change clarifies
that input and output of Header type must conform to the raw IP socket
format.

Change-Id: I6ca363f7ea9a3d7645ee81b588785204dee00cba
Reviewed-on: https://go-review.googlesource.com/128215
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-08-08 00:41:02 +00:00
Volker Dobler
19491d39ca publicsuffix: update table to latest list from publicsuffix.org
Update the list to revision 2225db8d9f4a2a27ec697c883360632fa0c16261
(2018-05-23T23:26:06Z).

Change-Id: Iec14ad04e81b205eeafdb6c8f02caec29f8df7e4
Reviewed-on: https://go-review.googlesource.com/128255
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-08-07 14:50:15 +00:00
Jean de Klerk
f4c29de78a trace: better error message for double init
Fixes golang/go#24137

Change-Id: Ifcf6449aed32071cdb643028347ec814bffd8d06
Reviewed-on: https://go-review.googlesource.com/127121
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-08-01 23:40:40 +00:00
Brad Fitzpatrick
22bb95c5e7 http2/hpack: lazily build huffman table on first use
This generated 120 kB on the heap before at init, regardless of
whether somebody used http2. Worse, because we vendored it into std,
users would have two copies, for about 256 kB of memory. After CL
127235 that went down to 60 kB per copy, so 120 kB for a binary using
golang.org/x/net/http2 explicitly.

With this, it goes to 0 until one of the two copies in the binary
actually uses one of the http2 packages.

I wasn't able to measure any difference with the Once.Do in the decode
path:

name             old time/op    new time/op    delta
HuffmanDecode-4     732ns ± 8%     707ns ± 3%   ~            (p=0.268 n=10+9)

(admittedly noisy)

Change-Id: I6c1065abc0c3458f3cb69e0f678978267ff35ea2
Reviewed-on: https://go-review.googlesource.com/127275
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-08-01 18:34:31 +00:00
Brad Fitzpatrick
32f9bdbd7d http2/hpack: reduce memory for huffman decoding table
Reduces process-wide heap (inuse_space) by 60kB by using a pointer to
a fixed-sized array instead of a slice of a fixed size.

Before:
119.44kB 23.43% 23.43%   147.88kB 29.01%  golang.org/x/net/http2/hpack.addDecoderNode

After:
 59.72kB 13.28% 39.85%    87.94kB 19.56%  golang.org/x/net/http2/hpack.addDecoderNode

(This is all work from an init func in http2/hpack)

Doesn't seem to affect runtime performance.

Measured with:

$ cat huffman_test.go
package main

import (
        "testing"

        _ "golang.org/x/net/http2"
        )

func TestMem(t *testing.T) {}

$ GODEBUG=memprofilerate=1 go test -memprofilerate=1 -memprofile=mem.prof -v .
=== RUN   TestMem
--- PASS: TestMem (0.00s)
PASS
ok      huffmem 0.052s

$ go tool pprof --inuse_space mem.prof

Change-Id: I5e56a5a2682f1063c955b342b37e97ca4c303dab
Reviewed-on: https://go-review.googlesource.com/127235
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-08-01 17:40:33 +00:00
Brad Fitzpatrick
49c15d80df http2: revert CL 107295 (don't sniff Content-type in Server when nosniff)
Updates golang/go#24795

Change-Id: Idb018ad9eba1292e91d9339190fdd24ef8a0af4e
Reviewed-on: https://go-review.googlesource.com/126895
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
2018-07-31 17:28:58 +00:00
Mikio Hara
a0f8a16cb0 ipv6: fix a typo
Change-Id: I70c1953d811234a78c88d073ff2a0001fbc9b6bf
Reviewed-on: https://go-review.googlesource.com/126640
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2018-07-30 21:41:32 +00:00
Mikio Hara
27e6fde75f ipv4: fix a typo
Change-Id: I7012df3e9083f5a158367009d5f41fc2517ac486
Reviewed-on: https://go-review.googlesource.com/126639
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2018-07-30 21:41:24 +00:00
Mikio Hara
8d04b09ac7 icmp: update docs
Makes parameter names not start in capitals.

Change-Id: I1861da0cbaff304b251f9540613cff8dc7beafd6
Reviewed-on: https://go-review.googlesource.com/126638
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2018-07-30 21:41:16 +00:00
Mikio Hara
17b7cf40ff icmp: fix error values on message manipulation
Change-Id: If5e0d21f01496cf89d035b07a884073044a4e886
Reviewed-on: https://go-review.googlesource.com/126637
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2018-07-30 21:41:07 +00:00
William Chang
c4299a1a0d http2/h2c: add h2c implementation (unencrypted HTTP/2)
Implements h2c by leveraging the existing http2.Server by implementing the 2
ways to start an h2c connection as described in RFC 7540, which are: (1)
create a connection starting with HTTP/1 and then upgrading to h2c [Section 3.2]
and (2) starting a connection directly speaking h2c (aka starting with prior
knowledge) [Section 3.4].

For both of the above connection methods the implementation strategy is to
hijack a HTTP/1 connection, perform the h2c connection on the hijacked
net.Conn, and create a suitably configured net.Conn to pass into
http2.Server.ServeConn.

For h2c with prior knowledge this is relatively simple. For that we just have
to verify the HTTP/2 client preface has been written to the net.Conn, and
then reforward the client preface to the hijacked connection.

For h2c upgraded from HTTP/1, this is a bit more involved. First we validate
the HTTP/1 Upgrade request, and respond to the client with 101 Switching
Protocols. Then we write a HTTP/2 client preface on behalf of the client,
and a settings frame and a headers frame which correspond to what was in
the upgrade request. Then since http2.Server is going respond with a
settings ACK, we swallow it so that it is not forwarded to the client since
for h2c upgrade from HTTP/1 the 101 Switching Protocols response replaces
the settins ACK.

Fixes golang/go#14141

Change-Id: I435f40216c883809c0dcb75426c9c59e2ea31182
Reviewed-on: https://go-review.googlesource.com/112999
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-07-29 18:37:19 +00:00
Brad Fitzpatrick
3673e40ba2 http2/h2demo: flush headers earlier in demo /ECHO handler
It confused somebody who thought things were hanging because they had
expected to see a response before they started streaming data.

Change-Id: If672956efde3756c966b0c88b9c15ed21daeccba
Reviewed-on: https://go-review.googlesource.com/125644
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-07-24 23:48:03 +00:00
Brad Fitzpatrick
a680a1efc5 http2: fix typo in comment
Change-Id: If08e7b6133a2458547598cd45ba591ab091cf03f
Reviewed-on: https://go-review.googlesource.com/125035
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-07-19 18:00:50 +00:00
Brad Fitzpatrick
179114c98f http2: reject large SETTINGS frames or those with duplicates
Per private report.

This isn't actually in the spec, but there's also no need to be so
permissive here.

Change-Id: I2b464778cc502ca7a99ea533622afea8f943eb7d
Reviewed-on: https://go-review.googlesource.com/124735
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-07-19 17:53:08 +00:00
Nigel Tao
81d44fd177 publicsuffix: add description of the PSL and eTLDs
Change-Id: Iba82f92f80a12b34bf802b50f3589dd1c03f5cf9
Reviewed-on: https://go-review.googlesource.com/124617
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-07-19 00:14:25 +00:00
Ian Gudger
8887df42c7 dns/dnsmessage: fix bug in length fixup
If during packing, the byte slice gets re-allocated between packing the
ResourceHeader and ResourceBody, the length will get updated in the old
byte slice before re-allocation resulting in a zero length in the final
packed message.

This change fixes the bug by passing the offset at which the length
should be written instead of a slice of the output byte slice from
ResourceHeader encoding step.

Updates golang/go#16218

Change-Id: Ifd7e2f549b7087ed5b52eaa6ae78970fec4ad988
Reviewed-on: https://go-review.googlesource.com/123835
Run-TryBot: Ian Gudger <igudger@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-07-18 18:21:12 +00:00
Brad Fitzpatrick
d0887baf81 http2: fix bug in earlier CL 123615
I both forgot that this list could contain duplicates, and I had
forgot to run the net/http tests against CL 123615 before mailing it,
which ended up catching this bug.

The diff of this file from the commit before CL 123615 (a45b4abe^ ==
cffdcf672) to this commit is:

    https://gist.github.com/bradfitz/0b7abf8fa421515aed9c4d55ce3a1994

... effectively reverting much of CL 123615 and just moving the 1xx
handling down lower.

Updates golang/go#26189 (fixes after vendor into std)
Updates golang/go#17739

Change-Id: Ib63060b0bb9721883b4b91a983b6e117994faeb9
Reviewed-on: https://go-review.googlesource.com/123675
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-07-12 20:28:26 +00:00
Brad Fitzpatrick
a1d68217f8 http2: export a field of an internal type for use by net/http
Updates golang/go#22891

Change-Id: Ibde5ce0867a78703a5a4f04fafc3d709ea4cbda3
Reviewed-on: https://go-review.googlesource.com/123656
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-07-12 20:05:04 +00:00
Brad Fitzpatrick
a45b4abe13 http2: ignore unknown 1xx responses like HTTP/1
Updates golang/go#26189 (fixes after vendor into std)
Updates golang/go#17739

Change-Id: I076cdbb57841b7dbbaa764d11240913bc3a8b05d
Reviewed-on: https://go-review.googlesource.com/123615
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-07-12 18:38:42 +00:00
Brad Fitzpatrick
cffdcf672a http2: use GetBody unconditionally on Transport retry, when available
We were previously only using the new-ish Request.GetBody to "rewind"
a Request.Body on retry when it seemed that we hadn't started the
read+write body copy process from the old request yet.

Apparently there's a bug somewhere, so this is a safe minimal fix for
now, unconditionally using GetBody when it's available, rather than
only using it when it seems we need to. Should have no performance impact
because it's supposed to be cheap, and this only happens on rare retries
where the server's GOAWAY came in-flight while we were writing a request.

Updates golang/go#25009 (not a fix, but enough for Go 1.11)

Change-Id: Ia462944d4a68cf2fde8d32b7b357b450c509a349
Reviewed-on: https://go-review.googlesource.com/123476
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-07-12 04:59:33 +00:00