- Notifications
You must be signed in to change notification settings - Fork1.2k
Comparing changes
Open a pull request
base repository:golang/net
Uh oh!
There was an error while loading.Please reload this page.
base:v0.22.0
head repository:golang/net
Uh oh!
There was an error while loading.Please reload this page.
compare:v0.24.0
- 20commits
- 17files changed
- 8contributors
Commits on Mar 7, 2024
http2: add IdleConnTimeout to http2.Transport
Exposes an IdleConnTimeout on http2.Transport directly, rather than rely on configuring it through the underlying http1 transport.Forgolang/go#57893Change-Id: Ibe506da39e314aebec1cd6df64937982182a37caGitHub-Last-Rev:cc8f171GitHub-Pull-Request:#173Reviewed-on:https://go-review.googlesource.com/c/net/+/497195Reviewed-by: Damien Neil <dneil@google.com>LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Commits on Mar 8, 2024
currently only http/https/socks5 scheme are allowed. However, any schemecould be possible if user provides their own implementation.Specifically, the widely used "socks5h://localhost" is parsed asScheme="http" Host="socks5h:", which does not make sense because hostname cannot contain ":".This patch allows any scheme to appear in the proxy config. And onlyfallback to http scheme if parsed scheme or host is empty.url.Parse() result of fallback cases:localhost => Scheme="localhost"localhost:1234 => Scheme="localhost" Opaque="1234"example.com => Path="example.com"Updatesgolang/go#24135Change-Id: Ia2c041e37e2ac61be16220fd41d6cb6fabeeca3dReviewed-on:https://go-review.googlesource.com/c/net/+/525257LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>Run-TryBot: Damien Neil <dneil@google.com>Reviewed-by: Michael Knyszek <mknyszek@google.com>Reviewed-by: Damien Neil <dneil@google.com>TryBot-Result: Gopher Robot <gobot@golang.org>Auto-Submit: Damien Neil <dneil@google.com>
http2: only set up positive deadlines
Fixesgolang/go#65785Change-Id: Icd95d7cae5ed26b8a2fe656daf8365e27a7785d8Reviewed-on:https://go-review.googlesource.com/c/net/+/565195LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>Reviewed-by: Damien Neil <dneil@google.com>Reviewed-by: Carlos Amedee <carlos@golang.org>
http2: prevent uninitialized pipe from being written
Forgolang/go#65927Change-Id: I6f48706156384e026968cf9a6d9e0ec76b46fabfReviewed-on:https://go-review.googlesource.com/c/net/+/566675Reviewed-by: Damien Neil <dneil@google.com>Reviewed-by: Carlos Amedee <carlos@golang.org>LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commits on Mar 11, 2024
http2: add testClientConn for testing client RoundTrips
Many RoundTrip tests involve testing against a test-definedserver with specific behaviors. For example: TestingRoundTrip's behavior when the server violates flowcontrol limits.Existing tests mostly use the clientTester type, whichstarts separate goroutines for the Transport and a fakeserver. This results in tests where the control flowbounces around the test function, and requires eachtest to manage its own synchronization.Introduce a new framework for writing RoundTrip tests.testClientConn allows client tests to be written linearly,with synchronization provided by the test framework.For example, a testClientConn test can, as a linearsequence of actions: - start RoundTrip; - check the request headers sent; - provide data to the request body; - check that a DATA frame is sent; - send response headers from the server to the client; - check that RoundTrip returns.See TestTestClientConn at the top of clientconn_test.gofor a full example.To enable synchronization with tests, this CLinstruments the RoundTrip path to record whengoroutines start, exit, and block waiting for events.This adds a certain amount of noise and bookkeepingto the client implementation, but (in my opinion)this is more than repaid in improved testability.The testClientConn also permits use of synthetictime in tests. At the moment, this is limited tothe response header timeout, but extending it toother timeouts (read, 100-continue) should bestraightforward.This CL converts a number of existing clientTester teststo use the new framework, but not all.Change-Id: Ief963889969363ec8469cd3c3de0becb2fc548f9Reviewed-on:https://go-review.googlesource.com/c/net/+/563540LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>Reviewed-by: Jonathan Amsterdam <jba@google.com>
neild committedMar 11, 2024 http2: reject DATA frames after 1xx and before final headers
When checking to see if a DATA frame can be accepted, check tosee if we have received a non-1xx header, not whether we havereceived any header.Fixesgolang/go#65927Change-Id: Id4fae1862de6179f8fc95e02dec7d4c47a7640e1Reviewed-on:https://go-review.googlesource.com/c/net/+/567175Reviewed-by: Jonathan Amsterdam <jba@google.com>LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
neild committedMar 11, 2024
Commits on Mar 19, 2024
http2: mark several testing functions as helpers
Change-Id: Ib5519fd882b3692efadd6191fbebbf042c9aa77dReviewed-on:https://go-review.googlesource.com/c/net/+/572376LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>Reviewed-by: Jonathan Amsterdam <jba@google.com>
neild committedMar 19, 2024 http2: use synthetic timers for ping timeouts in tests
Change-Id: I642890519b066937ade3c13e8387c31d29e912f4Reviewed-on:https://go-review.googlesource.com/c/net/+/572377LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>Reviewed-by: Jonathan Amsterdam <jba@google.com>
neild committedMar 19, 2024 http2: allow testing Transports with testSyncHooks
Change-Id: Icafc4860ef0691e5133221a0b53bb1d2158346ccReviewed-on:https://go-review.googlesource.com/c/net/+/572378Reviewed-by: Jonathan Amsterdam <jba@google.com>LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
neild committedMar 19, 2024 http2: validate client/outgoing trailers
This change is a counterpart to the HTTP/1.1 trailersvalidation CL 572615. This change will ensure that wevalidate trailers that were set on the HTTP clientbefore they are transformed to HTTP/2 equivalents.Updatesgolang/go#64766Change-Id: Id1afd7f7e9af820ea969ef226bbb16e4de6d57a5Reviewed-on:https://go-review.googlesource.com/c/net/+/572655Auto-Submit: Damien Neil <dneil@google.com>TryBot-Result: Gopher Robot <gobot@golang.org>Reviewed-by: Damien Neil <dneil@google.com>Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>Reviewed-by: David Chase <drchase@google.com>
Commits on Mar 20, 2024
http2: only set up deadline when Server.IdleTimeout is positive
Check outhttps://go-review.googlesource.com/c/go/+/570396Change-Id: I8bda17acebc27308c2a1723191ea1e4a9e64d585Reviewed-on:https://go-review.googlesource.com/c/net/+/570455LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>Reviewed-by: David Chase <drchase@google.com>Reviewed-by: Damien Neil <dneil@google.com>Auto-Submit: Damien Neil <dneil@google.com>
http2: use synthetic time in TestIdleConnTimeout
Rewrite TestIdleConnTimeout to use the new synthetic time andsynchronization test facilities, rather than using real timeand sleeps.Reduces the test time from 20 seconds to 0.Reduces all package tests on my laptop from 32 seconds to 12.Change-Id: I33838488168450a7acd6a462777b5a4caf7f5307Reviewed-on:https://go-review.googlesource.com/c/net/+/572379Reviewed-by: Jonathan Amsterdam <jba@google.com>Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
neild committedMar 20, 2024 http2: convert the remaining clientTester tests to testClientConn
Change-Id: Ia7f213346baff48504fef6dfdc112575a5459f35Reviewed-on:https://go-review.googlesource.com/c/net/+/572380Reviewed-by: Jonathan Amsterdam <jba@google.com>LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
neild committedMar 20, 2024 All tests which use clientTester have been converted to usetestClientConn, so delete clientTester.Change-Id: Id9a88bf7ee6760fada8442d383d5e68455c6dc3eReviewed-on:https://go-review.googlesource.com/c/net/+/572815Reviewed-by: Jonathan Amsterdam <jba@google.com>LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
neild committedMar 20, 2024 http2: make TestCanonicalHeaderCacheGrowth faster
Lower the number of iterations that this test runs for.Reduces runtime with -race from 27s on my M1 Mac to 0.06s.Change-Id: Ibd4b225277c79d9030c0a21b3077173a787cc4c1Reviewed-on:https://go-review.googlesource.com/c/net/+/572656Reviewed-by: Jonathan Amsterdam <jba@google.com>LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
neild committedMar 20, 2024
Commits on Mar 21, 2024
Change-Id: I7e2c867efcc960553da77e395b0069ab6776cd9fGitHub-Last-Rev:eaa122dGitHub-Pull-Request:#205Reviewed-on:https://go-review.googlesource.com/c/net/+/572995Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>Reviewed-by: David Chase <drchase@google.com>Auto-Submit: Damien Neil <dneil@google.com>LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>Reviewed-by: Damien Neil <dneil@google.com>
Commits on Apr 3, 2024
http2: close connections when receiving too many headers
Maintaining HPACK state requires that we parse and processall HEADERS and CONTINUATION frames on a connection.When a request's headers exceed MaxHeaderBytes, we don'tallocate memory to store the excess headers but we doparse them. This permits an attacker to cause an HTTP/2endpoint to read arbitrary amounts of data, all associatedwith a request which is going to be rejected.Set a limit on the amount of excess header frames wewill process before closing a connection.Thanks to Bartek Nowotarski for reporting this issue.FixesCVE-2023-45288Fixesgolang/go#65051Change-Id: I15df097268df13bb5a9e9d3a5c04a8a141d850f6Reviewed-on:https://team-review.git.corp.google.com/c/golang/go-private/+/2130527Reviewed-by: Roland Shoemaker <bracewell@google.com>Reviewed-by: Tatiana Bradley <tatianabradley@google.com>Reviewed-on:https://go-review.googlesource.com/c/net/+/576155Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>Reviewed-by: Than McIntosh <thanm@google.com>LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change-Id: I20cd0f8db534fe2a849306eb7e0c8ee5b434e88fReviewed-on:https://go-review.googlesource.com/c/net/+/576175Auto-Submit: Ian Lance Taylor <iant@golang.org>Reviewed-by: Ian Lance Taylor <iant@google.com>LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>Reviewed-by: Damien Neil <dneil@google.com>
http2: fix TestServerContinuationFlood flakes
This test causes the server to send a GOAWAY and close a connection.The server GOAWAY path writes a GOAWAY frame asynchronously, andcloses the connection if the write doesn't complete within 1s.This is causing failures on some builders, when the frame writedoesn't complete in time.The important aspect of this test is that the connection be closed.Drop the check for the GOAWAY frame.Change-Id: I099413be9c4dfe71d8fe83d2c6242e82e282293eReviewed-on:https://go-review.googlesource.com/c/net/+/576235Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>Reviewed-by: Than McIntosh <thanm@google.com>LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
neild committedApr 3, 2024
Commits on Apr 4, 2024
go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.Change-Id: I288208575b5d913be9a8b4ec87df5ca9753de151Reviewed-on:https://go-review.googlesource.com/c/net/+/576516LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>Auto-Submit: Gopher Robot <gobot@golang.org>Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>Reviewed-by: Than McIntosh <thanm@google.com>
gopherbot committedApr 4, 2024
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:git diff v0.22.0...v0.24.0
Uh oh!
There was an error while loading.Please reload this page.