Repository navigation
Conversation
Member
|
Many thanks for the PR. Did you observe an issue while using the library? A longer explanation: splitting a large text frame is a non-standard feature, supported only by the Java Spring broker. This feature may have been relevant when WebSocket implementations were not up to the mark. The current WebSocket standard and implementations support fragmenting large text messages transparently. So, this flag is probably unnecessary, and I had planned to drop it in the next major version. So, it is important for me to understand why you needed to use this flag. |
This branch has not been deployed
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.
With
splitLargeFrames: true, a substring boundary can separate a UTF-16 surrogate pair. Separate WebSocket text sends then replace the two lone surrogates, corrupting the STOMP body and its declared content length. An actual loopback reproduction at the default 8192-unit limit changes an 8143-byte body into 8145 received bytes.I keep complete pairs in the same text chunk. A one-unit limit cannot represent a pair, so the complete serialized text frame is checked before sending and that case throws
RangeErrorwithout a partial frame. A subsequent ASCII publish still works. Unsplit and binary paths retain their behavior. The option documentation now describes the existing UTF-16-unit limit; this does not implement a UTF-8 byte limit.Validation:
wsand native Node WebSocket loopback reproductions preserve the original bytes with the fix. An independent 19-case public-API probe passes for each transport, including tiny/default limits, header/body rejection, recovery and binary controls.Tested on Node 24.19.0/macOS arm64. No Spring broker or broader platform compatibility result is claimed. Changed docs/tests/changelog pass formatting; one unrelated original spacing finding remains in the handler.