{"record":{"id":"4e3cd9827c7b6d50","repo":"Zackriya-Solutions/meetily","slug":"malformed-content-range","errorCode":null,"errorMessage":"Malformed Content-Range: {}","messagePattern":"Malformed Content-Range: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs","lineNumber":212,"sourceCode":"\nfn parse_content_range(value: &reqwest::header::HeaderValue) -> Result<ContentRange> {\n    let value = value\n        .to_str()\n        .map_err(|e| anyhow!(\"Invalid Content-Range header encoding: {}\", e))?;\n    let value = value\n        .strip_prefix(\"bytes \")\n        .ok_or_else(|| anyhow!(\"Content-Range must use bytes: {}\", value))?;\n\n    if let Some(total) = value.strip_prefix(\"*/\") {\n        return total\n            .parse()\n            .map(|total| ContentRange::Unsatisfied { total })\n            .map_err(|e| anyhow!(\"Invalid unsatisfied Content-Range total: {}\", e));\n    }\n\n    let (range, total) = value\n        .split_once('/')\n        .ok_or_else(|| anyhow!(\"Malformed Content-Range: {}\", value))?;\n    let (start, end) = range\n        .split_once('-')\n        .ok_or_else(|| anyhow!(\"Malformed Content-Range range: {}\", value))?;\n    let start = start\n        .parse()\n        .map_err(|e| anyhow!(\"Invalid Content-Range start: {}\", e))?;\n    let end = end\n        .parse()\n        .map_err(|e| anyhow!(\"Invalid Content-Range end: {}\", e))?;\n    let total = total\n        .parse()\n        .map_err(|e| anyhow!(\"Invalid Content-Range total: {}\", e))?;\n    if start > end {\n        return Err(anyhow!(\"Content-Range start exceeds end: {}\", value));\n    }\n\n    Ok(ContentRange::Range { start, end, total })\n}","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/a2cb62e827da7ef59f65064c97233efb2313878e/frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs#L194-L230","documentation":"This error is thrown by parse_content_range in the Parakeet model downloader when the HTTP Content-Range header value returned by the model server cannot be split into 'start-end/total' form: split_once('/') found no '/' separator. It indicates the server's resume/range response header is structurally malformed or missing the expected syntax.","triggerScenarios":"A model-download resume/probe response (validate_partial_response or validate_unsatisfied_response path) supplies a Content-Range header without a '/' character, e.g. 'bytes 0-1023' instead of 'bytes 0-1023/2048', or an empty/garbage header value.","commonSituations":"A reverse proxy or CDN strips or rewrites the Content-Range header; the server returns an error body with a partial header; a non-compliant static file server is used as the model mirror.","solutions":["Verify the model download URL points at a server that returns RFC 7233-compliant Content-Range headers on 206 responses","Log the raw Content-Range value to see what the server actually returned","Test with curl -r 0-99 <url> -D - to inspect the header the mirror sends","Use a different mirror/source_base_url for the Parakeet model artifacts","Check for proxies/CDNs that strip Content-Range and bypass them"],"exampleFix":"// before (server sends malformed header, hard failure)\nlet (range, total) = value.split_once('/').ok_or_else(|| anyhow!(\"Malformed Content-Range: {}\", value))?;\n// after (tolerate missing total as unknown)\nlet (range, total) = match value.split_once('/') { Some(p) => p, None => (value.as_str(), \"*\") };","handlingStrategy":"validation","validationCode":"fn looks_like_content_range(v: &str) -> bool { let main = v.trim().trim_start_matches(\"bytes \"); main.contains('/') && main.split('/').next().map_or(false, |r| r.contains('-')) }","typeGuard":"fn is_valid_content_range(v: &Option<String>) -> bool { v.as_deref().map(looks_like_content_range).unwrap_or(false) }","tryCatchPattern":null,"preventionTips":["Use mirrors known to emit RFC 7233 Content-Range headers","Probe the download URL with a curl range request before wiring it into config","Log raw headers on 206 responses during integration testing"],"tags":["http","content-range","parsing","resumable-download"],"backgroundTag":"invalid-argument-format","analyzedSha":"a2cb62e827da7ef59f65064c97233efb2313878e","analyzedAt":"2026-09-12T11:12:14.152Z","contentChangedAt":"2026-09-12T11:12:14.152Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}