Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: golang/net Loading
base: v0.24.0
Choose a base ref
...
head repository: golang/net Loading
compare: v0.25.0
Choose a head ref
  • 8 commits
  • 12 files changed
  • 5 contributors

Commits on Apr 4, 2024

  1. quic: don't consider goroutines running when tests start as leaked

    Change-Id: I138e284ee74c9402402f564d25e50ab753c51e9e
    Reviewed-on: https://go-review.googlesource.com/c/net/+/576536
    Reviewed-by: Chressie Himpel <chressie@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    neild committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    a130fcc View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2024

  1. 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.
    
    For golang/go#66668
    
    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>
    neild authored and gopherbot committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    b67a0f0 View commit details
    Browse the repository at this point in the history
  2. http2: don't retry the first request on a connection on GOAWAY error

    When a server sends a GOAWAY frame, it indicates the ID of the
    last stream it processed. We use this to mark any requests after
    that stream as being safe to retry on a new connection.
    
    Change this to not retry the first request on a connection if we
    get a GOAWAY with an error, even if the GOAWAY has a stream ID
    of 0 indicating that it didn't process that request.
    If we're getting an error as the first result on a new connection,
    then there's either something wrong with the server or something
    wrong with our request; either way, retrying isn't likely to be
    productive and may be unsafe.
    
    This matches the behavior of the HTTP/1 client, which
    also avoids retrying the first request on a new connection.
    
    For golang/go#66668
    Fixes golang/go#60636
    
    Change-Id: I90ea7cfce2974dd413f7cd8b78541678850376a5
    Reviewed-on: https://go-review.googlesource.com/c/net/+/576895
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Jonathan Amsterdam <jba@google.com>
    neild committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    ec05fdc View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2024

  1. http/httpguts: speed up ValidHeaderFieldName

    Eliminate bounds checks and eschews UTF-8 decoding in ValidHeaderFieldName,
    thereby doubling its speed without introducing any allocations.
    Also eliminate bounds checks in IsTokenRune.
    
    Add tests and benchmarks for both ValidHeaderFieldName and IsTokenRune.
    
    goos: darwin
    goarch: amd64
    pkg: golang.org/x/net/http/httpguts
    cpu: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
                           │   before    │                after                │
                           │   sec/op    │   sec/op     vs base                │
    IsTokenRune-8            315.2n ± 0%   316.2n ± 1%        ~ (p=0.245 n=20)
    ValidHeaderFieldName-8   62.77n ± 0%   29.16n ± 0%  -53.55% (p=0.000 n=20)
    geomean                  140.7n        96.02n       -31.73%
    
                           │    before    │                after               │
                           │     B/op     │    B/op     vs base                │
    IsTokenRune-8            0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=20)
    ValidHeaderFieldName-8   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=20)
    geomean                             ²               +0.00%
    
                           │    before    │                after               │
                           │  allocs/op   │ allocs/op   vs base                │
    IsTokenRune-8            0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=20)
    ValidHeaderFieldName-8   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=20)
    geomean                             ²               +0.00%
    
    Fixes golang/go#66700
    
    Change-Id: Ia3ea80e5f0d173e3a69eb7429023587fd7bc5933
    GitHub-Last-Rev: 1f1d25d
    GitHub-Pull-Request: #207
    Reviewed-on: https://go-review.googlesource.com/c/net/+/578075
    Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>
    Reviewed-by: Damien Neil <dneil@google.com>
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Julien Cretel authored and neild committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    0a24555 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2024

  1. html: fix typo in package doc

    Change-Id: I3cacfadc0396c8ef85addd062d991bb6f5b0483a
    Reviewed-on: https://go-review.googlesource.com/c/net/+/580035
    Auto-Submit: Ian Lance Taylor <iant@google.com>
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    Commit-Queue: Ian Lance Taylor <iant@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Auto-Submit: Damien Neil <dneil@google.com>
    Reviewed-by: Damien Neil <dneil@google.com>
    Juneezee authored and gopherbot committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    f95a3b3 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2024

  1. quic: initiate key rotation earlier in connections

    The QUIC interop runner "keyrotate" test requires that the client
    initiate a key rotation early in the connection. With our current
    ack frequency, it seems that we need to rotate within the first
    300-400 packets for the test to pass.
    
    Reduce the initial key rotation from 1000 to 100 packets.
    Rotating earlier shouldn't have any real downsides
    (rotation is cheap and generally done once per connection,
    except for very long-lived connections), and this is simpler
    than providing a way to tune the rotation interval in one
    specific test.
    
    For golang/go#67138
    
    Change-Id: I33d47ea35ed39f0a13c171adb2b0698f8c93050e
    Reviewed-on: https://go-review.googlesource.com/c/net/+/582855
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Jonathan Amsterdam <jba@google.com>
    neild committed May 3, 2024
    Configuration menu
    Copy the full SHA
    b20cd59 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2024

  1. http2: use net.ErrClosed

    Use errors.Is(err, net.ErrClosed) instead of checking for a known
    string. net.ErrClosed is available since Go 1.16, the current minimum
    version in go.mod is Go 1.18.
    
    For golang/go#4373
    
    Change-Id: Id98771874434bae7d9c6d1d4d36fddb28822eb39
    Reviewed-on: https://go-review.googlesource.com/c/net/+/583016
    Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
    Reviewed-by: Damien Neil <dneil@google.com>
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    tklauser authored and gopherbot committed May 6, 2024
    Configuration menu
    Copy the full SHA
    e0324fc View commit details
    Browse the repository at this point in the history
  2. go.mod: update golang.org/x dependencies

    Update golang.org/x dependencies to their latest tagged versions.
    
    Change-Id: If4b46b8a597f56ee25582b456ee4ac5f42e3fdd4
    Reviewed-on: https://go-review.googlesource.com/c/net/+/583516
    Auto-Submit: Gopher Robot <gobot@golang.org>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Than McIntosh <thanm@google.com>
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    gopherbot committed May 6, 2024
    Configuration menu
    Copy the full SHA
    d27919b View commit details
    Browse the repository at this point in the history
Loading