Repository navigation
socket: Raise libsoup's server-side WebSocket message limit - #1267
Merged
Merged
Conversation
Newer libsoup also limits the size of reassembled fragmented messages through max-total-message-size. Set it to the same limit as the incoming payload size when the property is available.
hsorbo
force-pushed
the
libsoup-maxsize
branch
from
October 19, 2026 17:25
e74f0a7 to
f7a457c
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.
Since 17.24.0, libsoup includes 2df34d95 which makes SoupServer cap the total size of each incoming WebSocket message at 128 KiB (
max-total-message-size).WebConnection sends messages of up to 256 KiB, so the receiving side drops any message over 128 KiB and closes the connection.
Large scripts sent to Gadget hit this. With a jailed iOS device, a script of 130,912 bytes or more makes
create_script()fail withTransportError: the connection is closed.Fix: set
max-total-message-sizeto matchmax-incoming-payload-size. We set it through the GObject property, because the bundled VAPI doesn't expose it