Skip to content

test(websocket): cover the stale compressed flag through a real connection - #5857

Closed
askalf wants to merge 1 commit into
nodejs:mainfrom
sprayberry-code:test/websocket-continuation-after-compressed-message
Closed

askalf wants to merge 1 commit into
nodejs:mainfrom
sprayberry-code:test/websocket-continuation-after-compressed-message

Conversation

@askalf

@askalf askalf commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Follows up on #5827 after @KhafraDev's comments there.

The unit tests that PR added to test/websocket/receiver-unit.js built a fake of the parser's handler and sequenced frames with timers. They are removed here and replaced with one test in the shape of continuation-frames.js and fragments.js: a ws server negotiates permessage-deflate, sends a compressed message, then writes a bare continuation frame to the socket. The client must receive the message, and the connection must fail with 1002 Unexpected continuation frame.

With the fix from #5827 reverted locally the test fails (the continuation frame is accepted and the client never closes); with it, it passes. eslint is clean on both files.

Sorry for the extra work on the first round.

…ction

Replace the parser unit tests added in nodejs#5827 with one test in the shape
of the other websocket tests: a ws server negotiates permessage-deflate,
sends a compressed message, then writes a bare continuation frame. The
client must receive the message and the connection must fail with 1002
Unexpected continuation frame.

The unit tests reached into the parser's handler and sequenced frames
with timers; they are removed here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants