Repository navigation
Conversation
pjfanning
reviewed
Nov 29, 2026
pjfanning
left a comment
Member
There was a problem hiding this comment.
The test itself looks fine. One nit, not blocking: it only drives FrameEventRenderer -> FrameEventParser -> FrameHandler and has nothing to do with completion-close behaviour, so it would sit better in FramingSpec (or MessageSpec) than as a new group at the top of WebSocketCompletionCloseSpec.
Motivation: A transport read can end inside the UTF-8 reason of a valid Close frame. Modification: Use the stock frame renderer and split its output inside the first multibyte character before feeding the decoder. Result: The decoder reports normal status 1000 and the original reason without changing production code. Tests: Targeted WebSocketCompletionCloseSpec case passed on Scala 2.13.18 (JDK 17). Scoped formatting and header checks passed. References: RFC 6455 §5.5.1.
He-Pin
force-pushed
the
test/ws-close-reason-split
branch
from
November 29, 2026 14:38
2c553da to
fa72eb6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
A transport read may end inside a multibyte character in the reason of a valid WebSocket Close frame.
Modification
Render a normal Close with status 1000 using the production frame renderer, split the resulting bytes inside the first multibyte character, and pass the two reads through the existing decoder. No production changes.
Result
The decoder reports status 1000 and the original UTF-8 reason.
Tests
WebSocketCompletionCloseSpeccase passed on Scala 2.13.18 (JDK 17).References