From 7360f3755f2daaabdd56b0f1debc1e333d452065 Mon Sep 17 00:00:00 2001 From: Worph Date: Mon, 19 Oct 2026 18:45:16 +0000 Subject: [PATCH] resolve: 64 MiB redeem ceiling (a comic chapter redeems as one CBZ) --- src/resolve.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/resolve.rs b/src/resolve.rs index 645817e..4943b16 100644 --- a/src/resolve.rs +++ b/src/resolve.rs @@ -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 {