8000 Comparing v0.28.0...v0.31.0 · golang/net · GitHub
[go: up one dir, main page]

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 10000 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
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.28.0
Choose a base ref
...
head repository: golang/net
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.31.0
Choose a head ref
  • 18 commits
  • 31 files changed
  • 9 contributors

Commits on Sep 4, 2024

  1. websocket: fix printf(var) mistake detected by latest printf checker

    For golang/go#69267.
    
    Change-Id: Ica6d123312495966ad6d222d67944fd602216853
    Reviewed-on: https://go-review.googlesource.com/c/net/+/610799
    Reviewed-by: Alan Donovan <adonovan@google.com>
    Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    dmitshur authored and gopherbot committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    9bf379f View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2024

  1. go.mod: update golang.org/x dependencies

    Update golang.org/x dependencies to their latest tagged versions.
    
    Change-Id: I4be730755989f3d982deaac30cf72c1f3546d4b7
    Reviewed-on: https://go-review.googlesource.com/c/net/+/611198
    Auto-Submit: Gopher Robot <gobot@golang.org>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Michael Pratt <mpratt@google.com>
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    gopherbot committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    35b4aba View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2024

  1. route: fix address parsing of messages on Darwin

    sizeofSockaddrInet is 16, but first byte of sockaddr specifies actual
    size of sockaddr.
    
    Although, 16 works for most cases, it fails for Netmasks addresses. On
    Darwin only the significant bits of the netmask are in the msg.
    
    Take this route message as an example
    
    ```
    // rt_msg_hdr
    88 00 05 01 00 00 00 00
    41 08 00 00 07 00 00 00
    92 7b 00 00 01 00 00 00
    00 00 00 00 00 00 00 00
    00 00 00 00
    
    // metrics
    00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00
    
    // SOCKADDRS - DST  (100.113.0.0)
    10 02 00 00 64 71 00 00
    00 00 00 00 00 00 00 00
    
    // GW  utun4319
    14 12 21 00 01 08 00 00
    75 74 75 6e 34 33 31 39
    00 00 00 00
    
    // NETMASK 255.255.0.0
    06 02 00 00 ff ff
    
    // NULL
    00 00
    ```
    
    i.e. ipv4
    ```
    06 02 00 00 ff ff
    ```
    
    The above byte sequence is for a sockaddr that is 6 bytes long
    representing an ipv4 for address that is 255.255.0.0.
    
    i.e. ipv6 netmask
    ```
    0e 1e 00 00 00 00 00 00 ff ff ff ff ff ff 00 00
    ```
    
    The above is `/48` netmask that should also be parsed using `b[0]` of the
    sockaddr that contains the length.
    
    Confirmed by using `route monitor`.
    
    sources:
    https://github.com/apple/darwin-xnu/blob/main/bsd/net/route.h
    https://github.com/apple/darwin-xnu/blob/main/bsd/sys/socket.h#L603
    
    Fixes golang/go#44740
    
    Change-Id: I8153130d02d0a5e547fbf60a85762d3889e1d08c
    GitHub-Last-Rev: f7b9253
    GitHub-Pull-Request: #220
    Reviewed-on: https://go-review.googlesource.com/c/net/+/609577
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    Auto-Submit: Ian Lance Taylor <iant@google.com>
    hurricanehrndz authored and gopherbot committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    3c333c0 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. http2: add Server.WriteByteTimeout

    Transports support a WriteByteTimeout option which sets the maximum
    amount of time we can go without being able to write any bytes to
    a connection. Add an equivalent option to Server for consistency.
    
    Fixes golang/go#61777
    
    Change-Id: Iaa8a69dfc403906eb224829320f901e5a6a5c429
    Reviewed-on: https://go-review.googlesource.com/c/net/+/601496
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Carlos Amedee <carlos@golang.org>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    neild committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    541dbe5 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. http2: add support for server-originated pings

    Add configurable support for health-checking idle connections
    accepted by the HTTP/2 server, following the same configuration
    as the Transport.
    
    Fixes golang/go#67812
    
    Change-Id: Ia4014e691546b2c29db8dad3af5f39966d0ceb93
    Reviewed-on: https://go-review.googlesource.com/c/net/+/601497
    Reviewed-by: Carlos Amedee <carlos@golang.org>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    neild committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    4790dc7 View commit details
    Browse the repository at this point in the history
  2. http2: add support for net/http HTTP2 config field

    For golang/go#67813
    
    Change-Id: I6b7f857d6ed250ba8b09649730980a91b3e8d7e9
    Reviewed-on: https://go-review.googlesource.com/c/net/+/607255
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Jonathan Amsterdam <jba@google.com>
    neild committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    7191757 View commit details
    Browse the repository at this point in the history
  3. websocket: update nhooyr.io/websocket to github.com/coder/websocket

    Maintenance of nhooyr.io/websocket has moved to github.com/coder/websocket.
    
    Read more about the transition at https://coder.com/blog/websocket
    
    Updates golang/go#18152
    
    Change-Id: Ia2b11c9a57ad7ded775b50a5bbb7ea91562d39b5
    GitHub-Last-Rev: 59cea5e
    GitHub-Pull-Request: #222
    Reviewed-on: https://go-review.googlesource.com/c/net/+/614075
    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>
    Auto-Submit: Damien Neil <dneil@google.com>
    mafredri authored and gopherbot committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    f88258d View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2024

  1. go.mod: update golang.org/x dependencies

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

Commits on Oct 10, 2024

  1. http2: support ResponseController.EnableFullDuplex

    The ResponseController.EnableFullDuplex method indicates that an HTTP
    handler intends to interleave reads from a request body with writes
    to the response body.
    
    Add an EnableFullDuplex method to the ResponseWriter so we don't
    return a not-supported error. The HTTP/2 server always supports
    full duplex, so this is a no-op.
    
    For golang/go#57786
    
    Change-Id: I6529e6ce01d59b8b48fb67ba7c244255df57c174
    Reviewed-on: https://go-review.googlesource.com/c/net/+/472717
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    Reviewed-by: Дарья Бочкар <dasha7vanya@gmail.com>
    neild committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    42b1186 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2024

  1. internal/socket: execute gofmt

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

Commits on Oct 21, 2024

  1. http2: limit 1xx based on size, do not limit when delivered

    Replace Transport's limit of 5 1xx responses with a limit based
    on the maximum header size: The total size of all 1xx response
    headers must not exceed the limit we use on the size of the
    final response headers.
    
    (This differs slightly from the corresponding HTTP/1 change,
    which imposes a limit on all 1xx response headers *plus* the
    final response headers. The difference isn't substantial,
    and this implementation fits better with the HTTP/2 framer.)
    
    When the user is reading 1xx responses using a Got1xxResponse
    client trace hook, disable the limit: Each 1xx response is
    individually limited by the header size limit, but there
    is no limit on the total number of responses. The user is
    responsible for imposing a limit if they want one.
    
    For golang/go#65035
    
    Change-Id: I9c19dbf068e0f580789d952f63113b3d21ad86fc
    Reviewed-on: https://go-review.googlesource.com/c/net/+/615295
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Auto-Submit: Damien Neil <dneil@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    neild authored and gopherbot committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    4783315 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2024

  1. html: add Node.{Ancestors,ChildNodes,Descendants}()

    Adds iterators for the parents, immediate children, and all children of a Node respectively.
    
    Fixes golang/go#62113
    
    Change-Id: Iab015872cc3a20fe5e7cae3bc90b89cba68cc3f8
    GitHub-Last-Rev: d99de58
    GitHub-Pull-Request: #215
    Reviewed-on: https://go-review.googlesource.com/c/net/+/594195
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Auto-Submit: Ian Lance Taylor <iant@google.com>
    Reviewed-by: Damien Neil <dneil@google.com>
    earthboundkid authored and gopherbot committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    511cc3a View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2024

  1. README: don't recommend go get

    These days people will just import the packages and the go tool will
    do the right thing. We don't need to explain it.
    
    Add a pointer to the git repo, though.
    
    For golang/go#62645
    
    Change-Id: Ia5a16d8d66395e3feee2029ea1c3140b4d3939e7
    Reviewed-on: https://go-review.googlesource.com/c/net/+/624175
    Auto-Submit: 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>
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    ianlancetaylor authored and gopherbot committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    e883dae View commit details
    Browse the repository at this point in the history
  2. http2: detect hung client connections by confirming stream resets

    Consider the case of an unresponsive client connection, where
    the server has stopped responding. We send an infinite sequence of
    requests to the connection in sequence, each with a timeout.
    Each request counts against the concurrency limit for the
    connection while active, but when a request times out we send
    a RST_STREAM and free up the concurrency slot it was using.
    
    We continue to try to send requests to the connection forever (or
    until the kernel closes the underlying TCP connection, or until
    ReadIdleTimeout/WriteByteTimeout results in us closing the connection).
    
    Defend against this scenario by counting a canceled request
    against the connection concurrency limit until we confirm the
    server is responding. Specifically:
    
    Track the number of in-flight request cancellations in cc.pendingResets.
    This total counts against the connection concurrency limit.
    
    When sending a RST_STREAM for a canceled request, increment
    cc.pendingResets. Send a PING frame to the server, unless a PING
    is already in flight.
    
    When receiving a PING response, set cc.pendingResets to 0.
    
    A hung connection will be used for at most
    SETTINGS_MAX_CONCURRENT_STREAMS requests.
    
    When StrictMaxConcurrentStreams is false, we will create a
    new connection after reaching the concurrency limit for a hung one.
    
    When StrictMaxConcurrentStreams is true, we will continue to
    wait for the existing connection until some timeout closes it
    or it becomes responsive again.
    
    For golang/go#59690
    
    Change-Id: I0151f9a594af14b32bcb6005a239fa19eb103704
    Reviewed-on: https://go-review.googlesource.com/c/net/+/617655
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    Reviewed-by: Jonathan Amsterdam <jba@google.com>
    Reviewed-by: Carlos Amedee <carlos@golang.org>
    neild committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    f35fec9 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2024

  1. http2: support unencrypted HTTP/2 handoff from net/http

    Allow net/http to pass unencrypted net.Conns to Server/Transport.
    We don't have an existing way to pass a conn other than a *tls.Conn
    into this package, so (ab)use TLSNextProto to pass unencrypted
    connections:
    
    The http2 package adds an "unencrypted_http2" entry to the
    TLSNextProto maps. The net/http package calls this function
    with a *tls.Conn wrapping a net.Conn with an UnencryptedNetConn
    method returning the underlying, unencrypted net.Conn.
    
    For golang/go#67816
    
    Change-Id: I31f9c1ba31a17c82c8ed651382bd94193acf09b9
    Reviewed-on: https://go-review.googlesource.com/c/net/+/625175
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: David Chase <drchase@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    neild committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    0aa844c View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2024

  1. http2: surface errors occurring very early in a client conn's lifetime

    When we create a new connection for a request, the request should
    fail if the connection attempt fails.
    
    There is a race condition which can cause this to not happen:
    
    - net/http sends a request to a http2.Transport
    - the http2.Transport returns ErrNoCachedConn
    - net/http creates a new tls.Conn and passes it to the http2.Transport
    - the http2.Transport adds the conn to its connection pool
    - the connection immediately encounters an error
    - the http2.Transport removes the conn from its connection pool
    - net/http resends the request to the http2.Transport
    - the http2.Transport returns ErrNoCachedConn, and the process repeates
    
    If the request is sent to the http2.Transport before the connection
    encounters an error, then the request fails. But otherwise, we get
    stuck in an infinite loop of the http2.Transport asking for a new
    connection, receiving one, and throwing it away.
    
    To fix this, leave a dead connection in the pool for a short while
    if it has never had a request sent to it. If a dead connection is
    used for a new request, return an error and remove the connection
    from the pool.
    
    Change-Id: I64eb15a8f1512a6bda52db423072b945fab6f4b5
    Reviewed-on: https://go-review.googlesource.com/c/net/+/625398
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Jonathan Amsterdam <jba@google.com>
    neild committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    858db1a View commit details
    Browse the repository at this point in the history
  2. quic: add LocalAddr and RemoteAddr to quic.Conn

    These are missing for quic.Conn.
    
    Fixes golang/go#70138
    
    Change-Id: Ia443ffe0e73e143be5c29233a1ceb7cb16951acd
    GitHub-Last-Rev: a326378
    GitHub-Pull-Request: #225
    Reviewed-on: https://go-review.googlesource.com/c/net/+/623157
    Reviewed-by: Damien Neil <dneil@google.com>
    Reviewed-by: David Chase <drchase@google.com>
    Auto-Subm
    67E6
    it: Damien Neil <dneil@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    jfgiorgi authored and gopherbot committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    d7f220d View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2024

  1. go.mod: update golang.org/x dependencies

    Update golang.org/x dependencies to their latest tagged versions.
    
    Change-Id: Ic3d15c610f766d40730157ea878be90dd9e9c084
    Reviewed-on: https://go-review.googlesource.com/c/net/+/626378
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    Reviewed-by: David Chase <drchase@google.com>
    Auto-Submit: Gopher Robot <gobot@golang.org>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    gopherbot committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    334afa0 View commit details
    Browse the repository at this point in the history
Loading
0