actix-http-v3.18.13

actix/actix-webactix-http-v3.18.13Oct 11, 2026by robjtede

Upgrading?

AI Summary

This release focuses on enhancing HTTP/1 connection handling and WebSocket security by implementing stricter validation for handshake parameters and refining connection header parsing logic.

Key Highlights

  • Enforces strict validation for WebSocket handshakes, rejecting invalid Base64 keys and oversized Close frame payloads.
  • Improves HTTP/1 Connection header parsing to ensure consistency in upgrade advertisement handling.
  • Corrects Expect header logic to strictly apply to HTTP/1.1 requests.
  • Returns a 426 Upgrade Required response for unsupported WebSocket versions.

Breaking Changes

  • WebSocket Key Validation: Rejects handshake requests with invalid Base64 keys or keys that do not decode to 16 bytes.
  • WebSocket Close Frame Payloads: Rejects Close frames with payloads larger than 125 bytes.
  • Expect Header Behavior: Only treats 'Expect: 100-continue' as a valid expectation for HTTP/1.1 requests.

New Features

  • Emit required Connection options for HTTP/1 response upgrade advertisements without changing connection state.
  • Parse all HTTP/1 Connection header options consistently.
  • Only treat Expect: 100-continue as a continue expectation in HTTP/1.1 requests.
  • Reject WebSocket handshakes with invalid Sec-WebSocket-Key values.
  • Reject WebSocket Close frames with payloads larger than 125 bytes.
  • Return a 426 Upgrade Required response for unsupported WebSocket versions.

Full Release Notes

- Emit required `Connection` options for HTTP/1 response upgrade advertisements without changing connection state.
- Parse all HTTP/1 `Connection` header options consistently.
- Only treat `Expect: 100-continue` as a continue expectation in HTTP/1.1 requests.
- Reject WebSocket handshakes with a `Sec-WebSocket-Key` value that is not valid Base64 or does not decode to 16 bytes.
- Reject WebSocket Close frames with payloads larger than 125 bytes.
- Return a 426 Upgrade Required response when an unsupported WebSocket version is requested.

Related Repositories