resolve: 64 MiB redeem ceiling (a comic chapter redeems as one CBZ)
This commit is contained in:
+7
-3
@@ -45,9 +45,13 @@ pub const CONTENT_CID_HEADER: &str = "x-metamesh-content-cid";
|
||||
/// a store-back before it answers.
|
||||
const REDEEM_TIMEOUT: Duration = Duration::from_secs(60);
|
||||
|
||||
/// Ceiling on a redeemed body. A 100k-segment `.nzb` is ~16 MiB; a subtitle is
|
||||
/// kilobytes. Bounds a broken or hostile gateway.
|
||||
pub const MAX_REDEEM_BYTES: usize = 32 * 1024 * 1024;
|
||||
/// Ceiling on a redeemed body — the gateway's own `MAX_REDEEMED_BYTES`. A
|
||||
/// 100k-segment `.nzb` is ~16 MiB and a subtitle kilobytes, but a comic chapter
|
||||
/// redeems as one CBZ (`tachiyomi`, meta-feeder-suwayomi): ~24 MB measured for a
|
||||
/// 24-page chapter, more for a long webtoon one. Bounds a broken or hostile
|
||||
/// gateway. ⚠ The hull's resolve client caps the same body
|
||||
/// (`meta-share/src/plugins.rs`, `resolve`); raise both together.
|
||||
pub const MAX_REDEEM_BYTES: usize = 64 * 1024 * 1024;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum RedeemError {
|
||||
|
||||
Reference in New Issue
Block a user