More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Repair HTTP Range & Partial Response Bugs

    1

    Diagnose and repair HTTP Range requests, 206/416 handling, Content-Range, resumable downloads, validators, and representation consistency.

    $1

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Repair HTTP Range & Partial Response Bugs

    Repair HTTP Range & Partial Response Bugs

    Example session with this skill installed

    My Go server returns 416 errors when Chrome tries to resume a download. Here is the handler code. Check the Content-Range logic and the validator check.

    • Read your context and instructions
    • Compiled the repair http range

    I have analyzed the provided Go handler. The issue stems from an off-by-one error in the Content-Range header calculation and a missing check for the If-Range header, which causes the client to fail its consistency check during resume.

    HTTP Range Repair Analysis

    ComponentCurrent BehaviorCorrected Behavior
    Range Parsingend index is treated as exclusive.end index must be inclusive per RFC 7233.
    Content-Rangebytes 0-100/100 (invalid length).bytes 0-99/100 (zero-indexed).
    ValidatorsIgnores If-Range header.Must verify ETag or Last-Modified before 206.
    FallbackAlways returns 416 on mismatch.Falls back to 200 OK if If-Range fails.

    Proposed Patch (Go)

    func handleRangeRequest(w http.ResponseWriter, r *http.Request, size int64, modTime time.Time, etag string) {
        rangeHeader := r.Header.Get("Range")
        if rangeHeader == "" {
            // Normal 200 OK flow
            return
        }
    
        // Fix: Verify If-Range validator for resumable consistency
        if ifRange := r.Header.Get("If-Range"); ifRange != "" {
            if ifRange != etag && ifRange != modTime.Format(http.TimeFormat) {
                // Validator mismatch: must return full entity
                serveFullContent(w, r)
                return
            }
        }
    
        ranges, err := parseRange(rangeHeader, size)
        if err != nil {
            w.Header().Set("Content-Range", fmt.Sprintf("bytes */%d", size))
            w.WriteHeader(http.StatusRequestedRangeNotSatisfiable)
            return
        }
    
        ra := ranges[0]
        w.Header().Set("Content-Range", ra.contentRange(size)) // Ensure inclusive: bytes start-end/total
        w.Header().Set("Accept-Ranges", "bytes")
        w.WriteHeader(http.StatusPartialContent)
        // ... write io.NewSectionReader
    }
    

    Next steps

    1. Update the parseRange helper to return inclusive byte offsets.
    2. Verify that your ETag generation is deterministic across server restarts.
    3. Test with curl -H "Range: bytes=0-10" -H "If-Range: invalid-etag" to ensure it falls back to 200 OK.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Repair HTTP Range & Partial Response Bugs targets production and repository defects around diagnose and repair HTTP Range requests, 206/416 handling, Content-Range, resumable downloads, validators, and representation consistency.. It examines Range parsing and normalization, 206 versus 200 fallback rules, Content-Range and Content-Length correctness, If-Range and validator behavior, compression versus byte-range representation, multi-range support or explicit rejection, client resume/append semantics, proxy/cache compatibility and tests, then establishes one explicit repair contract and focused deterministic validation.

    The skill works from repository access or partial evidence such as snippets, logs, configuration, traces, and architecture notes. It preserves existing product/security policy, avoids invented execution claims, and keeps production systems, real credentials, and deployment outside the validation path.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    Does not perform production load testing or live credential verification. Requires manual confirmation of storage-level byte-offset capabilities.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    Permissions

    Terminal / Shell
    Listed2 months ago
    Updated9 days ago

    What's inside

    Frequently Asked Questions

    This skill identifies and fixes failures in resumable downloads and partial content delivery, including incorrect 206/416 status codes, Content-Range header mismatches, and broken If-Range validator logic.

    The skill is compatible with any AI agent that has repository access or can process log and snippet inputs, regardless of the underlying backend language or framework.

    No complex installation is required; simply provide the agent with access to your codebase, logs, or traces, and it will begin the diagnostic and repair workflow.

    It analyzes how your server handles compression (like Gzip) alongside byte-range requests to ensure proxies and caches don't serve corrupted or mismatched data segments.

    You receive the full diagnostic logic, a repair contract for fixing identified bugs, and a suite of deterministic validation tests to ensure the fix works across different client resume scenarios.

    Yes, the skill is designed to operate within your existing security policies, working strictly from code evidence and logs without requiring access to live production environments or real credentials.

    New in APIs & Backend