Ask for the XMLRPC size limit outside the settings batch - #3257
Merged
Conversation
The settings probe sent set_xmlrpc_size_limit as one of eight commands in a single request and assigned every reading inside the if($req->success()) that followed. rtorrent 0.16.22 refuses a limit above SCgiTask::max_content_size, which is 16777216, and the value asked for is 67108863, so the batch faulted on every installation and left directory, session, libVersion, server, portRange, port, bind, ip, uid, gid and home unset together. The interface showed it as an empty libTorrent version, an unknown rTorrent user, the listening port falling back to the daemon default, and autotools, xmpp and rutracker_check disabling themselves with an empty session path. Ask for the limit in its own request with important = false, the way this file already treats system.api_version and network.listen.port, and shift the four indices after it. The limit is still requested; a daemon that refuses it no longer takes the readings down.
xirvik
added a commit
that referenced
this pull request
Sep 5, 2026
php/settings.php asks for 67108863. rtorrent 0.16.22 refuses it -- "XMLRPC size limit cannot exceed the SCGI content size limit" -- so since #3257 sent the request on its own it fails quietly and the limit stays at the default of 524288. Torrent files travel through XMLRPC in load.raw_start, so on 0.16.22 only small ones can be added. The value was never reachable on any version. SCgiTask::max_content_size is (2 << 23) in 0.16.21 and 0.16.22 alike and scgi_task.cc refuses any request whose CONTENT_LENGTH exceeds it: on 0.16.21 a request declaring 16777217 is closed unanswered while 16777216 is served. 0.16.22 only began refusing to configure a size its transport was never going to carry. 16777216 is that ceiling. Both versions accept it, it raises the limit where 67108863 left it at the default, and it is already the maximum php/xmlrpc_proxy.php lets a caller ask for.
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.
Fixes #3256.
php/settings.php sent set_xmlrpc_size_limit as one of eight commands in a single batched request, with every other reading assigned only inside the success check that followed. rtorrent 0.16.22 refuses any limit above SCgiTask::max_content_size (16777216); the value asked for, 67108863, is over that on every installation, so the batch faults and takes directory, session, libVersion, server, portRange, port, bind, ip, uid, gid and home down with it — an empty libTorrent version, an unresolved rTorrent user, the daemon's default port, and autotools/xmpp/rutracker_check disabling themselves with an empty session path.
The limit now goes out in its own request marked important = false, the idiom this file already uses for system.api_version and network.listen.port, and the four indices after it in the main batch shift down by one. The limit is still requested; a refusal no longer takes the other seven readings with it.
Verified against rTorrent 0.16.22: version, session path, port and uid all resolve, and the three plugins load. rTorrent 0.16.21, where the limit is accepted, is unaffected.
No automated test: the fault path is inside rTorrentSettings::obtain()'s live daemon handshake, which the suite doesn't mock at the transport level.