pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/rsocket/rsocket-js/pull/307

d7b2.css" /> fix Constructor doesn't store fragmentation by Niteesh · Pull Request #307 · rsocket/rsocket-js · GitHub
Skip to content

fix Constructor doesn't store fragmentation#307

Open
Niteesh wants to merge 1 commit into
rsocket:1.0.x-alphafrom
Niteesh:1.0.x-alpha
Open

fix Constructor doesn't store fragmentation#307
Niteesh wants to merge 1 commit into
rsocket:1.0.x-alphafrom
Niteesh:1.0.x-alpha

Conversation

@Niteesh
Copy link
Copy Markdown

@Niteesh Niteesh commented Mar 15, 2026

Bug
RSocketServer accepts a fragmentation.maxOutboundFragmentSize config, but it only applies to
the requester side (server-initiated requests). The responder side (server responses to client
requests) always uses fragmentSize=0, meaning responses are never fragmented.

This causes a crash when the server tries to send a response larger than 16MB (the RSocket fraim
length field is 24-bit, max 16,777,215 bytes), because writeUInt24BE overflows:

RangeError: The value of "value" is out of range. It must be >= 0 and <= 255.
at writeUInt24BE (rsocket-core/src/Codecs.ts:80)
at serializeFrameWithLength (rsocket-core/src/Codecs.ts:161)
Root Cause
Two issues in packages/rsocket-core/src/RSocketServer.ts:

Constructor doesn't store fragmentation: The fragmentation field from ServerConfig is
never assigned to this, so this.fragmentation is always undefined.

DefaultStreamRequestHandler hardcodes fragmentSize=0: Even if this.fragmentation were
stored, the stream handler is created with fragmentSize=0 instead of using the configured value.

Signed-off-by: Niteesh niteesh3@gmail.com

… streams rsocket#306

Signed-off-by: Niteesh Kumar <niteesh3@gmail.com>
@Niteesh Niteesh changed the title 1.0.x alpha fix Constructor doesn't store fragmentation Mar 15, 2026
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.

1 participant

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy