Commit Graph

964 Commits

Author SHA1 Message Date
Brad Fitzpatrick
9313baa13d net: skip tests on OS X 10.8 to avoid a kernel panic
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/28587
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2016-09-07 15:33:35 +00:00
Brad Fitzpatrick
1358eff22f http2: fix all vet warnings
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>
2016-09-01 05:44:53 +00:00
Mikio Hara
9bc2a3340c internal/netreflect: fix test on nacl, plan9 and windows
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>
2016-08-31 03:06:24 +00:00
Mikio Hara
6250b41279 ipv6: deduplicate socket option code
Change-Id: I836cdf68901dc77bc4c086cabd9d43fd033fbf1d
Reviewed-on: https://go-review.googlesource.com/27736
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-08-26 23:57:38 +00:00
Mikio Hara
b398290406 ipv4: deduplicate socket option code
Change-Id: If22f722cf87f7e5833b9c9aea0a078db83f37c26
Reviewed-on: https://go-review.googlesource.com/27734
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-08-26 23:57:27 +00:00
Mikio Hara
7722dc0af8 ipv6: use of internal/netreflect package
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>
2016-08-26 23:50:20 +00:00
Mikio Hara
7625277703 ipv4: use of internal/netreflect package
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>
2016-08-26 23:50:02 +00:00
Mikio Hara
6c89f96179 internal/netreflect: new package
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>
2016-08-26 03:27:45 +00:00
Brad Fitzpatrick
3a1f9ef983 http2: don't send bogus :path pseudo headers if Request.URL.Opaque is set
Fixes golang/go#16847

Change-Id: I1e6ae1e0746051fd4cf7afc9beae7853293d5b68
Reviewed-on: https://go-review.googlesource.com/27632
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2016-08-25 02:14:58 +00:00
Brad Fitzpatrick
7394c112ea http2: fix protocol violation regression when writing certain request bodies
The mod_h2 workaround CL (git rev 28d1bd4,
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>
2016-08-19 23:26:38 +00:00
Volker Dobler
07b51741c1 publicsuffix: update table to latest list from publicsuffix.org
Update the list to revision 533b016049473e520193e70156e4b54dc1f19568
(2016-08-05T11:21:15Z).

Change-Id: Ic79e83245a86a0c27ac855479073be41c970c527
Reviewed-on: https://go-review.googlesource.com/26851
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2016-08-11 23:51:42 +00:00
Brad Fitzpatrick
075e191f18 http2: adjust flow control on open streams when processing SETTINGS
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/25508
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2016-08-05 16:39:04 +00:00
Brad Fitzpatrick
7c62cfdccc http2: add missing import path declaration
Change-Id: Ic37b6b84bfc695cfb1ca7cf8e7da52c801e6d236
Reviewed-on: https://go-review.googlesource.com/25500
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2016-08-04 21:33:21 +00:00
Brad Fitzpatrick
57bfaa875b http2: add more Transport logging around why connections close
For debugging golang/go#16514

Change-Id: I8aa5706eef4e9b4104cab391172b8919601ebf3a
Reviewed-on: https://go-review.googlesource.com/25440
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-08-03 15:59:20 +00:00
Brad Fitzpatrick
e2ba55e4e7 http2: fix Transport.RoundTrip hang on stream error before headers
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>
2016-08-03 01:52:23 +00:00
Brad Fitzpatrick
f6d2119838 http2: add more HEADERS and error logging in GODEBUG=http2debug=2 mode
To help debug golang/go#16572

Change-Id: Ia154faedd243a06a4110f6e6a4885b7cd0a04e1f
Reviewed-on: https://go-review.googlesource.com/25401
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-08-02 14:27:26 +00:00
Brad Fitzpatrick
28d1bd4fbe http2: make Transport work around mod_h2 bug
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
(de4e3031ae)
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/25362
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-08-01 23:26:40 +00:00
Brad Fitzpatrick
35028a49ca http2: don't ignore DATA padding in flow control
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>
2016-08-01 02:38:47 +00:00
Brad Fitzpatrick
6a513affb3 http2: return flow control for closed streams
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/25231
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-07-26 22:16:01 +00:00
Brad Fitzpatrick
9f2c271364 http2: fix data race on cc.singleUse
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/25230
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-07-26 08:29:38 +00:00
Mikio Hara
4d38db7685 route: don't crash or hang up with corrupted messages
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>
2016-07-20 08:41:39 +00:00
Brad Fitzpatrick
3797cd8864 http2: make Transport prefer HTTP response header recv before body write error
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>
2016-07-17 22:45:10 +00:00
Brad Fitzpatrick
be28236b90 http2: make Transport treat "Connection: close" the same as Request.Close
Both "Connection: close" and Request.Close should mean the same thing:
to use the same connection.

The Request.Close case was fixed in https://golang.org/cl/24810 for
Request.Close but I forgot about "Connection: close". Unify the code.

Fixes flaky failures such as:
https://storage.googleapis.com/go-build-log/6adb97bd/freebsd-amd64-gce101_5c331c2a.log
(noticed by Ian on a https://golang.org/cl/24977 trybot run)

Updates golang/go#15612

Change-Id: I3ab5175b8bc528ee240370c906b00cc691651bb4
Reviewed-on: https://go-review.googlesource.com/24982
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-07-17 05:54:02 +00:00
Ian Lance Taylor
45b61eaf18 context/ctxhttp: if context is canceled, return its error
This preserves the promise that Do will return the context's error.

Fixes golang/go#16381

Change-Id: I0db49b175736a695199b38819b4ff97b83d9c5ed
Reviewed-on: https://go-review.googlesource.com/24977
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-07-16 21:44:27 +00:00
Brad Fitzpatrick
e90d6d0afc http2: fix flaky TestTransportResPattern_* tests
The test's server was replying with the stream closure before reading
the test client's request body. This should in theory be handled
better (and golang/go#16029 will be kept open to track it), but that's not
what this test was trying to test anyway.

Instead, make the test do things in the expected order so it can
continue to test its original subject reliably. (It was trying to test
all the orders of optional & optionally fragmented headers in responses.)

Updates golang/go#16029 (flaky http2 TestTransportResPattern_*)
Updates golang/go#11811 (subrepos need to be green)

Change-Id: I631730fce5dad598120bb2d1ea8895e39255d711
Reviewed-on: https://go-review.googlesource.com/24970
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-07-15 18:41:38 +00:00
Brad Fitzpatrick
a728288923 http2: make Transport honor Request.Close more aggressively
The old support for Request.Close was optimistic, but there were still
windows where two connections should share the same
connection. Instead, support it earlier and more explicitly.

This fixes a flaky test on FreeBSD which was probably only flaky due
to unfortunate scheduling/timing.

Change-Id: I2eed9e59116356257e1b7df7a034b1c5d5f6533a
Reviewed-on: https://go-review.googlesource.com/24810
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-07-13 21:26:39 +00:00
Brad Fitzpatrick
c9a3c546a1 http2: fix flaky TestTransportReqBodyAfterResponse_403
Removes a time.Sleep from a test.

Fixes golang/go#16102

Change-Id: Ic1079ad3312d2dcfde4cc16dd0ee9661e1e509f2
Reviewed-on: https://go-review.googlesource.com/24903
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2016-07-13 19:45:06 +00:00
Brad Fitzpatrick
f841c39de7 context/ctxhttp: add a specialized minimal version for Go 1.7
Change-Id: Ib174b984184191d803364c684070346a105ef4b5
Reviewed-on: https://go-review.googlesource.com/24620
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Dave Day <djd@golang.org>
2016-07-07 22:37:29 +00:00
Nigel Tao
7864c9eef8 publicsuffix: update table to latest list from publicsuffix.org.
Also drop some leading zeroes in in the generated table.go file. Its
size drops from 140K to 124K. After gzipping, this is from 46K to 45K.
It's not a huge win, but it's a win.

Change-Id: Ib1c13fb8b58b4eca231b5d74c15297f245c62e7c
Reviewed-on: https://go-review.googlesource.com/24753
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-07-07 05:36:24 +00:00
Jonathan Rudenberg
b400c2eff1 http2: add additional blacklisted ciphersuites
TLS_RSA_WITH_AES_128_GCM_SHA256 and TLS_RSA_WITH_AES_256_GCM_SHA384
are also blacklisted in RFC 7540 Appendix A.

Because they are were implemented in Go 1.6, the isBadCipher
function has been moved into the version-tagged files so that the
repo doesn't break for Go 1.5 users.

Change-Id: If8ca058ede51e9a4a337ce8d645cfd9f370d49b4
Reviewed-on: https://go-review.googlesource.com/24214
Reviewed-by: Adam Langley <agl@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-06-30 22:09:10 +00:00
Brad Fitzpatrick
8e573f4005 http2: merge multiple GOAWAY frames' contents into error message
The http2 spec permits multiple GOAWAY frames if the conditions
change.  Merge their error messages together, preferring the first
non-empty debug data, and first non-ErrCodeNo error code.

Updates golang/go#14627

Change-Id: I073b9234d71f128ed0713f09a24c728b56d7c1ae
Reviewed-on: https://go-review.googlesource.com/24600
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-29 22:54:44 +00:00
Brad Fitzpatrick
ef2e00e88c http2: make Transport return server's GOAWAY error back to the user
Updates golang/go#14627 (fixes once bundled into std)

Change-Id: Iae91d165df749e06549a25f9664ee416f115573f
Reviewed-on: https://go-review.googlesource.com/24560
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-28 23:24:14 +00:00
Michael Hudson-Doyle
04557861f1 webdav: skip test that fails with gccgo
Change-Id: Ibcb2fbb6a016046dd67e92372376f0f639979e37
Reviewed-on: https://go-review.googlesource.com/24484
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-06-27 22:15:07 +00:00
Michael Hudson-Doyle
e445b19913 ipv4: add support for ppc (using gccgo)
Change-Id: I06f6ade2788e8cc86d3027af60ec33800092a6d1
Reviewed-on: https://go-review.googlesource.com/24485
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
2016-06-27 00:46:36 +00:00
Michael Hudson-Doyle
641602e72f ipv6: add support for ppc (using gccgo)
Change-Id: I1e81ca4bd1396b4ddd0c8eb7368ebceb99409318
Reviewed-on: https://go-review.googlesource.com/24486
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
2016-06-27 00:46:01 +00:00
Gyu-Ho Lee
bc3663df0a http2: fix typo in ReadFrame
This fixes a minor typo in frame.go ReadFrame.

Change-Id: Idb6d4d412a6bc27fa8afb6f03007e974cd98d0c9
Reviewed-on: https://go-review.googlesource.com/24310
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
2016-06-21 21:56:08 +00:00
Matt Layher
7c71ca708c bpf: implement LoadExtension and ExtLen for VM
Change-Id: I29487b0c1fdea97b5c35d22b4f7c23e11e7ceeed
Reviewed-on: https://go-review.googlesource.com/24272
Reviewed-by: David Anderson <danderson@google.com>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
2016-06-20 21:42:44 +00:00
Mikio Hara
8bf2b39827 bpf: fix a typo
Change-Id: I5b865483bf6a8bba07934ae3b1ff5bbbf6dd6a00
Reviewed-on: https://go-review.googlesource.com/24240
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Tom Heng <zhm20070928@gmail.com>
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
2016-06-19 23:45:41 +00:00
Matt Layher
1961d9def2 bpf: add Go implementation of virtual machine
Fixes golang/go#16055.

Change-Id: I80437e2895b0f2bf23e090dec29bd20c2900db9a
Reviewed-on: https://go-review.googlesource.com/24136
Reviewed-by: David Anderson <danderson@google.com>
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
2016-06-18 00:31:17 +00:00
Nigel Tao
d7bf3545bb webdav: respect the Handler.Prefix in confirmLocks.
Fixes golang/go#15967.

Change-Id: I24ffebbe70d15cfd8697c843972f4f1669670f17
Reviewed-on: https://go-review.googlesource.com/24023
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-16 00:25:24 +00:00
Nigel Tao
3f122ce3db publicsuffix: strip generated comments; automatically scrape git version.
Also follow the "go generate" convention, and have the generation
command be a bare "go run gen.go" without any need for explicit flags.

Stripping the for-debugging comments shrinks the generated table.go file
from 538K to 139K.

Also update table to latest list from publicsuffix.org:
revision ea9f4f9c51f5bfc5c85a41a5637ab671c07c542a
(2016-05-31T18:30:56Z)

Change-Id: Ib59366106e0142fd65a2102e73d6a9a29e53930e
Reviewed-on: https://go-review.googlesource.com/23930
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-09 05:12:31 +00:00
Mikio Hara
313cf39d4a http2: fix data race on pipe
Fixes golang/go#15999.

Change-Id: I20793ce717c768557c4942ff6be4e77c23ab201c
Reviewed-on: https://go-review.googlesource.com/23880
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-08 02:50:06 +00:00
Andrew Gerrand
154d9f9ea8 http2: consider buffered data when doing stream flow control
Fixes golang/go#15930

Change-Id: Ib5d2f57361d52364edb29df25ec9a498c3088781
Reviewed-on: https://go-review.googlesource.com/23812
Reviewed-by: Aaron Jacobs <jacobsa@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
2016-06-07 04:32:31 +00:00
Tom Bergan
c4c3ea7191 http2: GotFirstResponseByte hook should only fire once
Fixes golang/go#15777

Change-Id: I6fd8a8fdea051f3c02272cc15af7f0bcdfb5d745
Reviewed-on: https://go-review.googlesource.com/23526
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
2016-05-31 15:01:52 +00:00
Dave Cheney
7553b97266 websocket: fix Read behaviour in hybiFrameReader.Read
The contract for Read specifies that a caller should process n bytes of
data before handling an error value. The previous implementation may
have discarded the final data read from the underlying reader if err
was non nil.

Change-Id: I81547cd9ea62c4060f79523679beed6bbc6ccd95
Reviewed-on: https://go-review.googlesource.com/23534
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-05-31 06:23:09 +00:00
H. İbrahim Güngör
30db96677b webdav: set 'getlastmodified' live property for directories
WebDAV clients can't sort folders by date because 'getlastmodified' live
property is not set.

Fixes golang/go#15334.

Change-Id: Ie56fcf8ae98173878e0972c0f9401151953334ff
Reviewed-on: https://go-review.googlesource.com/23422
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2016-05-27 00:43:53 +00:00
Mikio Hara
dfd9ed699e http2: fix nits in test
Change-Id: Ib988bde8f8ff5719fd24bf63bd5ece648602dbd8
Reviewed-on: https://go-review.googlesource.com/23460
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-05-26 04:20:37 +00:00
ayanamist
b3e9c8fbe0 http2: allow http scheme for http2
The existing transport implementation limit scheme to https, so
simple h2c can not be used, if we loose the limit to http scheme,
it works well with existing h2c server support.

Fixes golang/go#15830

Change-Id: Icfe65d72b3e6fb41f69019539fb5b86144814378
Reviewed-on: https://go-review.googlesource.com/23181
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Andrew Gerrand <adg@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-05-25 21:22:51 +00:00
Brad Fitzpatrick
0c607074ac http2: prevent Server from sending status 100 header after anything else
Since Go's HTTP/2 Handlers can read & write concurrently, it was
previously possible for a Handler to get an HTTP Request with "Expect:
100-continue" and to first Write some data, then read some data, and
the read of the data was triggering the server's automatic
"100-continue" response path.  But if the server had already replied
with a non-100 HEADERS frame, sending a HEADERS frame with :status 100
later is in violation of the spec.

Fix it by tracking whether we've already replied with something, and
ignoring the 100-continue when it's inappropriate.

Updates golang/go#14030

Change-Id: I6745ba0f257a31eaf63816e4263cadbef5a896a2
Reviewed-on: https://go-review.googlesource.com/23311
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-05-21 00:25:09 +00:00
Brad Fitzpatrick
4d07e8a493 http2: let handlers close Request.Body without killing streams
Also, fix a Transport goroutine leak if the transport is still trying
to write its body after the stream has completed.

Updates golang/go#15425 (fixes after bundle into std)

Change-Id: Id14d9360d012f53a963ec1999ef88fc592978b80
Reviewed-on: https://go-review.googlesource.com/23287
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-05-20 20:56:38 +00:00