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: honojs/node-server
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.0
Choose a base ref
...
head repository: honojs/node-server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.0.1
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Apr 30, 2026

  1. fix: forward Hono response headers during WebSocket upgrade (#346)

    Headers attached to the Response returned by the Hono app
    (e.g. `Set-Cookie`, custom auth headers, `WWW-Authenticate` on reject)
    were dropped during the WebSocket handshake on both successful and
    rejected upgrades.
    
    - Successful upgrade: append response headers via `wss.on('headers', ...)`,
      the official `ws` API for injecting handshake headers. The listener is
      removed in `finally`; `headers` is emitted synchronously inside
      `handleUpgrade`, so it cannot leak across concurrent upgrades on the
      shared `wss`.
    - Rejected upgrade: include response headers in the manual
      `socket.end(...)` HTTP response written by `rejectUpgradeRequest`.
    - Skip hop-by-hop headers per RFC 9110 Section 7.6.1, framing
      (`content-length`), and WebSocket handshake headers managed by `ws`
      (`sec-websocket-accept`, `sec-websocket-extensions`, `sec-websocket-protocol`)
      to avoid corrupting the handshake.
    gentamura authored Apr 30, 2026
    Configuration menu
    Copy the full SHA
    0ed7656 View commit details
    Browse the repository at this point in the history
  2. 2.0.1

    yusukebe committed Apr 30, 2026
    Configuration menu
    Copy the full SHA
    9138a80 View commit details
    Browse the repository at this point in the history
Loading