{"record":{"id":"4b1be733b03966ff","repo":"jdx/mise","slug":"server-returned-partial-content-without-a-resumabl","errorCode":null,"errorMessage":"server returned partial content without a resumable request","messagePattern":"server returned partial content without a resumable request","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/http.rs","lineNumber":1140,"sourceCode":"                    debug!(\"range request at offset {offset} was unsatisfied for {total} bytes\");\n                }\n                partial.clear()?;\n                if offset > 0 && !restarted_without_resume {\n                    restarted_without_resume = true;\n                    continue;\n                }\n                resp.error_for_status_ref()?;\n            }\n\n            let (write_offset, total_size, validator, resumable, effective_filename) =\n                if resp.status() == StatusCode::PARTIAL_CONTENT {\n                    let Some((state, _)) = resume else {\n                        partial.clear()?;\n                        if !restarted_without_resume {\n                            restarted_without_resume = true;\n                            continue;\n                        }\n                        bail!(\"server returned partial content without a resumable request\");\n                    };\n                    let content_range = resp\n                        .headers()\n                        .get(CONTENT_RANGE)\n                        .and_then(|value| value.to_str().ok())\n                        .and_then(parse_content_range);\n                    let Some(ParsedContentRange::Bytes { start, end, total }) = content_range\n                    else {\n                        partial.clear()?;\n                        if restarted_without_resume {\n                            bail!(\"server returned an invalid Content-Range response\");\n                        }\n                        restarted_without_resume = true;\n                        continue;\n                    };\n                    let validator = response_validator(resp.headers());\n                    let response_length_matches = resp\n                        .content_length()","sourceCodeStart":1122,"sourceCodeEnd":1158,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/http.rs#L1122-L1158","documentation":"During a resumable HTTP download, a server responded 206 (partial content) even though the request was not resumable (no resume state was available, and a previous restart without resume already happened). mise cannot trust partial data it never asked for, so it clears the partial and bails.","triggerScenarios":"The downloader retries a failed download without a Range header (after clearing resume state), the server still returns 206 Partial Content, and this is the second time it happens (restarted_without_resume already true).","commonSituations":"Broken/misbehaving proxy or CDN that always returns 206 regardless of Range headers; buggy caching layer mangling requests; server-side middleware that rewrites Range requests.","solutions":["Bypass or fix the proxy/cache in front of the server — it's returning partial content for non-Range requests.","Retry from a different mirror or direct download source.","Clear the partial download cache and retry in case stale state contributed."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"curl -fsSI -H 'Range: bytes=0-0' \"$url\" | grep -i '^content-range:' || echo \"server mishandles Range requests\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Probe servers/proxies for correct Range behavior before relying on resumable downloads","Bypass caching layers that always answer 206","Use mirrors known to support conditional GET correctly"],"tags":["http","download","range-requests","resume"],"backgroundTag":"unexpected-response-shape","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}