Zackriya-Solutions/meetily · error

Partial response has an unsatisfied Content-Range

Error message

Partial response has an unsatisfied Content-Range

What it means

Thrown by `validate_partial_response` when the Content-Range header cannot be parsed as a satisfied range (e.g. it says `bytes */1234` meaning the range was NOT satisfied, or the header is malformed). The `let ... else` destructuring of `parse_content_range` fails, so the downloader refuses the response.

Source

Thrown at frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs:761

    }

    fn validate_partial_response(
        response: &reqwest::Response,
        expected_start: u64,
        exact_bytes: u64,
    ) -> Result<()> {
        if response.status() != reqwest::StatusCode::PARTIAL_CONTENT {
            return Err(anyhow!(
                "Expected partial 206 response, received {}",
                response.status()
            ));
        }
        let content_range = response
            .headers()
            .get(reqwest::header::CONTENT_RANGE)
            .ok_or_else(|| anyhow!("Partial response is missing Content-Range"))?;
        let ContentRange::Range { start, end, total } = parse_content_range(content_range)? else {
            return Err(anyhow!("Partial response has an unsatisfied Content-Range"));
        };
        if start != expected_start || end != exact_bytes - 1 || total != exact_bytes {
            return Err(anyhow!(
                "Partial response range {}-{} / {} does not match {}-{} / {}",
                start,
                end,
                total,
                expected_start,
                exact_bytes - 1,
                exact_bytes
            ));
        }
        let expected_length = end
            .checked_sub(start)
            .and_then(|length| length.checked_add(1))
            .ok_or_else(|| anyhow!("Partial response range length overflow"))?;
        if let Some(content_length) = Self::declared_content_length(response)? {
            if content_length != expected_length {

View on GitHub (pinned to a2cb62e827)

Solutions

  1. Delete the partial file and restart the download from byte 0 — an unsatisfied range means the server cannot serve the requested offset.
  2. Verify the remote file hasn't changed (size/version) since the partial download started.
  3. Fix or replace the mirror server so it emits valid `Content-Range: bytes start-end/total` headers.
Defensive patterns

Strategy: fallback

Validate before calling

let cr = resp.headers().get("content-range").and_then(|v| v.to_str().ok());
let satisfied = cr.map(|c| c.starts_with("bytes ") && !c.contains("*/")).unwrap_or(false);
if !satisfied { eprintln!("range unsatisfied or malformed ({:?}); restart download", cr); }

Try / catch

match result {
    Err(e) if e.to_string().contains("unsatisfied Content-Range") => delete_partial_and_restart(),
    other => other,
}

Prevention

When it happens

Trigger: 206/416-class response whose Content-Range is `bytes */<total>` (unsatisfied range), or a malformed Content-Range value the parser cannot decompose into start/end/total.

Common situations: Server signaling that the requested offset is no longer valid because the file changed; custom servers emitting a syntactically invalid Content-Range; middleboxes truncating the header.

Related errors


AI-assisted analysis of Zackriya-Solutions/meetily@a2cb62e827 (2026-09-12). Data as JSON: /api/errors/fecd677155a89081. Report an issue: GitHub.