More screenshots

    Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseOpenClawOpenClaw+21 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.

    $8.99

    Secure checkout via Stripe

    30-day refund 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.

    What you get

    Fix off-by-one errors in Content-Range and Content-Length headers.Implement If-Range validator checks to prevent corrupted resumes.Debug byte-range mismatches caused by GZIP or Brotli compression.Audit partial content responses for RFC 7233 compliance.

    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.

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 1 month ago

    • Passed all security checks, Safe to install

    Listed1 month ago

    What's inside

    Frequently Asked Questions