Zackriya-Solutions/meetily · warning

Content-Range must use bytes: {}

Error message

Content-Range must use bytes: {}

What it means

parse_content_range requires the Content-Range value to start with 'bytes ' (RFC 7233). If the header exists but lacks that prefix, it fails with 'Content-Range must use bytes: {value}'. This guards the Parakeet engine's ranged model download/resume logic which only supports byte ranges.

Source

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

#[cfg(test)]
struct ModelLifecycleTestHook {
    load_started: tokio::sync::Notify,
    continue_load: tokio::sync::Notify,
    unload_attempted: tokio::sync::Notify,
}

enum ContentRange {
    Range { start: u64, end: u64, total: u64 },
    Unsatisfied { total: u64 },
}

fn parse_content_range(value: &reqwest::header::HeaderValue) -> Result<ContentRange> {
    let value = value
        .to_str()
        .map_err(|e| anyhow!("Invalid Content-Range header encoding: {}", e))?;
    let value = value
        .strip_prefix("bytes ")
        .ok_or_else(|| anyhow!("Content-Range must use bytes: {}", value))?;

    if let Some(total) = value.strip_prefix("*/") {
        return total
            .parse()
            .map(|total| ContentRange::Unsatisfied { total })
            .map_err(|e| anyhow!("Invalid unsatisfied Content-Range total: {}", e));
    }

    let (range, total) = value
        .split_once('/')
        .ok_or_else(|| anyhow!("Malformed Content-Range: {}", value))?;
    let (start, end) = range
        .split_once('-')
        .ok_or_else(|| anyhow!("Malformed Content-Range range: {}", value))?;
    let start = start
        .parse()
        .map_err(|e| anyhow!("Invalid Content-Range start: {}", e))?;
    let end = end

View on GitHub (pinned to a2cb62e827)

Solutions

  1. Verify the model server supports Range requests (Accept-Ranges: bytes) and standard byte units.
  2. Send 'Range: bytes=N-' explicitly and confirm the response is 206 with 'bytes ...' Content-Range.
  3. Bypass or reconfigure the proxy/CDN that rewrites headers.
  4. Fall back to a full (non-resumable) download when the unit is unsupported.
Defensive patterns

Strategy: validation

Validate before calling

let ok = resp.status() == 206 && resp
    .headers()
    .get(CONTENT_RANGE)
    .and_then(|v| v.to_str().ok())
    .map_or(false, |v| v.starts_with("bytes "));
if !ok { fallback_to_full_download(); }

Type guard

fn has_byte_content_range(resp: &reqwest::Response) -> bool {
    resp.headers().get(reqwest::header::CONTENT_RANGE)
        .and_then(|v| v.to_str().ok())
        .map_or(false, |v| v.starts_with("bytes "))
}

Try / catch

if !has_byte_content_range(&resp) {
    warn!("non-bytes Content-Range; resuming unsupported");
    return download_without_resume(url).await;
}

Prevention

When it happens

Trigger: validate_partial_response/validate_unsatisfied_response receiving a Content-Range header like 'items 0-99/200', 'none', or any non-'bytes ' unit, typically from a 206/416 response of a non-conforming server.

Common situations: Server/proxy not honoring Range requests and replying with a differently-unitied Content-Range; a CDN or dev mock returning a non-standard unit; a 416 response formatted with 'bytes */total' missing the 'bytes ' prefix entirely.

Related errors


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