mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-05 05:39:22 +00:00
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:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user