WebSocket client: reset inflater after Z_STREAM_END with context takeover - #34105
Merged
Jarred-Sumner merged 4 commits intoJul 14, 2026
Merged
Claude / Claude Code Review
completed
Jul 14, 2026 in 14m 10s
Code review found 1 potential issue
Found 2 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 0 |
| 🟣 Pre-existing | 1 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟣 Pre-existing | src/http_jsc/websocket_client/WebSocketDeflate.rs:182-185 |
Intra-message BFINAL: bytes after Z_STREAM_END within the same message are discarded |
Annotations
Check notice on line 185 in src/http_jsc/websocket_client/WebSocketDeflate.rs
claude / Claude Code Review
Intra-message BFINAL: bytes after Z_STREAM_END within the same message are discarded
Pre-existing / non-blocking: the loop still `break`s unconditionally on `StreamEnd`, so if a *single* message payload contains a BFINAL=1 block followed by a fresh DEFLATE stream (RFC 7692 §7.2.3.4/§7.2.3.5 permit per-fragment BFINAL flushing), the bytes remaining after `Z_STREAM_END` are discarded and that message is delivered truncated — the post-loop `reset()` only recovers the *next* message. A `self.decompress_stream.reset()` + `continue` (when `remaining` holds more than the appended trail
Loading