Zackriya-Solutions/meetily · error

416 response has a satisfied Content-Range

Error message

416 response has a satisfied Content-Range

What it means

A 416 response must carry an unsatisfied Content-Range (bytes */<total>) per RFC 9110. This error is thrown when the 416 reply instead contains a satisfied range (bytes <start>-<end>/<total>), which is protocol-violating and gives the engine no reliable total size to validate against.

Source

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

    fn validate_unsatisfied_response(response: &reqwest::Response, exact_bytes: u64) -> Result<()> {
        if response.status() != reqwest::StatusCode::RANGE_NOT_SATISFIABLE {
            return Err(anyhow!(
                "Expected range-not-satisfiable 416 response, received {}",
                response.status()
            ));
        }
        let content_range = response
            .headers()
            .get(reqwest::header::CONTENT_RANGE)
            .ok_or_else(|| anyhow!("416 response is missing Content-Range"))?;
        match parse_content_range(content_range)? {
            ContentRange::Unsatisfied { total } if total == exact_bytes => Ok(()),
            ContentRange::Unsatisfied { total } => Err(anyhow!(
                "416 response reports {} total bytes, expected {}",
                total,
                exact_bytes
            )),
            ContentRange::Range { .. } => Err(anyhow!("416 response has a satisfied Content-Range")),
        }
    }

    async fn download_model_detailed_from_source(
        &self,
        model_name: &str,
        model_dir: &Path,
        base_url: &str,
        artifacts: &[ArtifactSpec],
        progress_callback: Option<Box<dyn Fn(DownloadProgress) + Send>>,
    ) -> Result<()> {
        let active_download = self.reserve_active_download(model_name).await?;
        self.set_downloading_status(model_name, 0).await;

        let result = self
            .download_artifacts(
                model_name,
                model_dir,

View on GitHub (pinned to a2cb62e827)

Solutions

  1. Fix the server to emit the unsatisfied form 'Content-Range: bytes */<total>' for out-of-bounds Range requests.
  2. Bypass the non-compliant server and download from the canonical Hugging Face URL.
  3. Delete the partial file so the engine skips the 416 probe path entirely and issues a plain GET.
  4. Report/work around by serving the model from a compliant host (nginx, S3, huggingface.co).

Example fix

// before (buggy server)
HTTP/1.1 416 Requested Range Not Satisfiable
Content-Range: bytes 0-1048575/2439443128
// after (compliant)
HTTP/1.1 416 Requested Range Not Satisfiable
Content-Range: bytes */2439443128
Defensive patterns

Strategy: fallback

Validate before calling

// inspect the Content-Range form returned on out-of-bounds Range requests
curl -s -D - -o /dev/null -r 999999999- <base_url>/<filename> | grep -i content-range
// compliant: 'bytes */<total>'; non-compliant: 'bytes <start>-<end>/<total>'

Try / catch

if let Err(e) = download_result {
    if e.to_string().contains("satisfied Content-Range") {
        // server malformed: drop the partial file so no Range probe is issued
        delete_partial(model_dir, filename)?;
        return retry_download_fresh().await;
    }
    return Err(e.into());
}

Prevention

When it happens

Trigger: The server responds 416 but with a Content-Range of the satisfied form (e.g. bytes 0-99/1000) instead of the asterisk form, during the resume size-probe.

Common situations: Non-compliant or buggy file servers that echo back the last valid range on error; middleware that rewrites Content-Range headers; custom static servers implemented incorrectly.

Related errors


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