Answer an oversized RPC response with a fault

Cap XML-RPC and JSON-RPC output at the SCGI response limit before handing it over.
This commit is contained in:
xirvik
2026-09-19 01:58:29 +00:00
committed by Jari Sundell
parent 2086e8e780
commit 80ae6a4590
8 changed files with 80 additions and 1 deletions
+3
View File
@@ -2,6 +2,7 @@
#define RTORRENT_RPC_SCGI_TASK_H
#include <chrono>
#include <cstdint>
#include <memory>
#include <mutex>
#include <vector>
@@ -18,6 +19,8 @@ public:
static constexpr int max_header_size = 2000;
static constexpr int max_content_size = (1 << 26);
static constexpr uint32_t max_response_size = (100 << 20);
static constexpr auto timeout_request = std::chrono::seconds(60);
enum ContentType { XML, JSON };