Repair Request Body Replay Bugs

    by Mariusz Wrzeszczynski

    1

    Repair consumed request-body reuse, empty retry uploads, stream pre-consumption, unsafe replay, and unlimited buffering across HTTP retries and redirects.

    Secure checkout via Stripe

    0 installsSecurity scanned

    Works with the AI tools you already use

    CClaude CodeCCursorCCodex CLIGGitHub CopilotGGemini CLI+17 more

    See it in action

    You say

    Our Python/FastAPI service uploads large media files to a partner API with httpx. The retry wrapper retries network errors and 401 after token refresh. The body is an open file object inside multipart form-data. On the first attempt the partner test server reads the full request and then closes the connection; the retry reuses the same multipart/file object and sends an empty file. Some uploads can be several GB, so buffering the full body in RAM is not acceptable. Repair locally with generated files and a fake HTTP server. Do not call production, upload customer files, or assume the partner supports idempotency.

    Your agent does

    Request-body replay bug found. Multipart/file objects are reused after consumption, so a retry can send an empty body. The repair creates a fresh body per allowed attempt, avoids full RAM buffering, separates replayability from idempotency, blocks blind resend after unknown outcomes, and adds exact-byte local tests. Provider idempotency remains unverified.

    What you get

    Prevent empty request bodies on HTTP retries or redirectsImplement bounded spooling for large multipart uploads to save memoryEnforce idempotency guards for unsafe POST/PUT operations during failoverGenerate deterministic tests for stream-based request body consumption

    About this skill

    Retry logic can silently corrupt streamed requests. A file or multipart body is consumed on attempt one, then attempt two sends zero bytes. A signing middleware hashes a one-shot stream before the HTTP client sees it. Redirects, auth refresh, failover, and retry wrappers can all make the same mistake.

    Repair Request Body Replay Bugs gives an AI coding agent a repository workflow for classifying body replayability, creating fresh body factories, separating body replay from operation idempotency, bounding local spooling, handling unknown outcomes, and proving exact bytes/attempt counts with local fake servers.

    It does not call production APIs, replay live writes, buffer unlimited payloads, or invent provider idempotency guarantees.

    How to install

    Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.

    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 today

    Listedtoday

    Frequently Asked Questions

    Popular in Testing & QA