Repository navigation
Conversation
Signed-off-by: Matteo Collina <hello@matteocollina.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5435 +/- ##
==========================================
- Coverage 93.36% 93.33% -0.03%
==========================================
Files 110 110
Lines 36993 37019 +26
==========================================
+ Hits 34537 34552 +15
- Misses 2456 2467 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Independent verification of e522b51 — I am not the author; I checked out the PR locally and tried to prove it wrong. Offered in case it saves a reviewer some time. The new test discriminates. Applied to the base commit f4045b9 (the PR head's parent) without the On the PR head the same file passes 14/14, three consecutive runs, identical exit code 0. The rationale also checks out against the code: Also run, on the PR head (Windows 11, Node v24.14.1):
On the 9 uncovered lines codecov flags (patch coverage 70%): locally they are the reworked inflate Not verified here: benchmarks, the Autobahn suite, WPT, other Node versions/OSes (CI covers those and is green), the sender/compress path, and anything outside Reproduction details and output hashes |
This relates to...
WebSocket
maxPayloadSizeenforcement for fragmented permessage-deflate messages.Rationale
The receiver passed the current decompressed fragment total to
PerMessageDeflate.decompress(), but the inflater ignored that argument. As a result, compressed fragmented messages were rejected only after the inflated chunk was appended, allowing inflate work beyond the remaining message budget.Changes
Features
N/A
Bug Fixes
PerMessageDeflate.decompress()to account for the current decompressed message size while inflating.currentPayloadSize + current inflate outputexceedsmaxPayloadSize.maxPayloadSizeagainst existing decompressed fragments.Breaking Changes and Deprecations
N/A
Status
Validation:
node --test test/websocket/fragments.js test/websocket/permessage-deflate-limit.js test/websocket/permessage-deflate-config.js test/websocket/permessage-deflate-windowbits.js test/websocket/stream/too-many-fragments.jsnpm run lint