Skip to content

v0.0.35 - Reset rejected HTTP/2 streams

Latest

Choose a tag to compare

@Kludex Kludex released this 25 Oct 13:06
b7281a8

🔁 Reset rejected HTTP/2 streams on the wire

zttp 0.0.35 sends RST_STREAM for every HTTP/2 stream it rejects, so clients get an answer instead of waiting forever. You will notice it with malformed requests, such as a plain CONNECT or a content-length that does not match the body.

pip install --upgrade zttp==0.0.35
  • Rejected streams no longer hang the client (#288). zttp used to surface a RstStream event for streams it rejected, but never queued the frame for data_to_send(). It now sends it when next_event() returns the event. Resets sent by the peer are still not echoed back.
  • Streams reset on DATA errors are closed (#288). DATA after END_STREAM and flow-control errors now close and evict the stream, so it stops counting toward MAX_CONCURRENT_STREAMS and accepts no more frames. These resets count toward max_stream_resets.

🧰 Friendlier Python API

  • send_data accepts any contiguous buffer (#290). Connection.send_data and Stream.send_data take memoryview, bytearray and other buffers, not only bytes. The data is copied, so the buffer is only borrowed for the call.
  • Name HTTP/2 error codes with zttp.H2ErrorCode (#284). An IntEnum of the RFC 9113 error codes for Stream.reset(), H2Connection.close(), RstStream.error_code and GoAway.error_code.

📡 Sturdier HTTP/3

  • Out-of-range QUIC packet numbers are dropped (#291). A packet whose number decodes past 2^62 - 1 (RFC 9000 12.3) is now dropped before decryption, instead of closing the HTTP/3 connection when zttp tried to ACK it.

⚠️ Python 3.11 or newer

  • Python 3.10 is no longer supported (#283). zttp now requires Python 3.11+, and no wheels are built for 3.10.

Full changelog: v0.0.34...v0.0.35