[mirror] Go supplementary network libraries
Перейти к файлу
Damien Neil ef58d90fdf [internal-branch.go1.21-vendor] http2: send correct LastStreamID in stream-caused GOAWAY
When closing a connection because a stream contained a request we
didn't like (for example, because the request headers exceed
the maximum we will accept), set the LastStreamID in the GOAWAY
frame to include the offending stream. This informs the client
that retrying the request is unlikely to succeed, and avoids
retry loops.

This change requires passing the stream ID of the offending
stream from Framer.ReadFrame up to the caller. The most sensible
way to do this would probably be in the error. However,
ReadFrame currently returns a defined error type for
connection-ending errors (ConnectionError), and that type is a
uint32 with no place to put the stream ID. Rather than changing
the returned errors, ReadFrame now returns an error along with
a non-nil Frame containing the stream ID, when a stream is
responsible for a connection-ending error.

Merge conflicts were avoided by cherry-picking CL 576235 (test deflake)
prior to this, and then by squashing CL 576175 (typo fix) into this CL.

For golang/go#66668.
For golang/go#66697.

Change-Id: Iba07ccbd70ab4939aa56903605474d01703ac6e4
Reviewed-on: https://go-review.googlesource.com/c/net/+/576756
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-on: https://go-review.googlesource.com/c/net/+/578336
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
2024-04-12 19:37:43 +00:00
bpf bpf: check for little endian CPU for OS VM comparison 2023-06-06 21:42:20 +00:00
context all: remove redundant type conversion 2022-09-09 16:43:09 +00:00
dict all: fix a few function names on comments 2022-10-12 13:50:44 +00:00
dns/dnsmessage dns/dnsmessage: add fuzz test 2023-07-07 17:38:37 +00:00
html html: handle equals sign before attribute 2023-06-20 17:16:42 +00:00
http http/httpproxy: remove comment on https proxy precedance 2022-09-07 13:56:53 +00:00
http2 [internal-branch.go1.21-vendor] http2: send correct LastStreamID in stream-caused GOAWAY 2024-04-12 19:37:43 +00:00
icmp all: correct typos in comments 2023-02-07 17:08:46 +00:00
idna idna: update for Unicode 15.0.0 2023-06-13 20:37:45 +00:00
internal quic: connection ids 2023-07-12 16:29:46 +00:00
ipv4 ipv4,ipv6: remove unneeded deadlines added for flaky tests 2023-05-16 21:31:51 +00:00
ipv6 ipv4,ipv6: remove unneeded deadlines added for flaky tests 2023-05-16 21:31:51 +00:00
lif lif: import syscall rather than golang.org/x/sys/unix 2022-08-05 01:12:31 +00:00
nettest ipv4, ipv6, nettest: skip unsupported tests on wasip1 2023-04-19 19:08:58 +00:00
netutil all: correct typos in comments 2023-02-07 17:08:46 +00:00
proxy proxy: fix TestDial failures on wasm/js 2019-06-28 18:53:45 +00:00
publicsuffix publicsuffix: embed table data 2022-11-16 23:25:23 +00:00
route all: add FreeBSD riscv64 support 2022-08-09 01:22:01 +00:00
trace all: fix some comments 2023-02-08 14:49:55 +00:00
webdav all: fix some comments 2023-05-10 21:21:25 +00:00
websocket all: correct typos in comments 2023-02-07 17:08:46 +00:00
xsrftoken xsrftoken: add custom timeout support for valid func 2020-10-08 22:28:04 +00:00
.gitattributes net: add .gitattributes (fixes windows build) 2014-12-23 17:05:08 +11:00
.gitignore gitignore: remove obsolete reference to .hgignore in comment 2020-03-20 18:12:08 +00:00
CONTRIBUTING.md CONTRIBUTING.md: remove note about not accepting Pull Requests 2018-03-14 18:02:42 +00:00
LICENSE LICENSE: add 2012-03-17 15:20:00 +11:00
PATENTS go.net: add PATENTS file to the subrepo. 2012-04-16 11:24:46 +10:00
README.md README.md: add badge to pkg.go.dev 2020-12-07 22:46:15 +00:00
codereview.cfg net: add codereview.cfg 2015-03-18 17:04:12 +00:00
go.mod go.mod: update golang.org/x dependencies 2023-07-05 14:20:15 +00:00
go.sum go.mod: update golang.org/x dependencies 2023-07-05 14:20:15 +00:00

README.md

Go Networking

Go Reference

This repository holds supplementary Go networking libraries.

Download/Install

The easiest way to install is to run go get -u golang.org/x/net. You can also manually git clone the repository to $GOPATH/src/golang.org/x/net.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html. The main issue tracker for the net repository is located at https://github.com/golang/go/issues. Prefix your issue with "x/net:" in the subject line, so it is easy to find.