Skip to content

bun: Bun.serve does not capture request bodies #23884

Closed

Description

@isaacs

Deno calls captureBodyFromWinterCGRequest and Cloudflare calls captureIncomingRequestBody. Bun calls neither, so dataCollection.httpBodies and maxRequestBodySize have no effect on Bun.serve routes.

bunserver.ts:236 also builds normalizedRequest by hand rather than using winterCGRequestToRequestData, which is what Deno and Cloudflare use. Worth checking that header scrubbing matches.

Work item. Use winterCGRequestToRequestData and captureBodyFromWinterCGRequest in bunserver.ts.

**Prior art **(related history only). No issue for Bun. The Deno equivalent shipped as #22912 (merged, maxRequestBodySize for Deno HTTP bodies) and is the model to copy.

Activity

  1. linear-code commented on Sep 2, 2026

    @linear-code
  2. added
    javascriptPull requests that update javascript code
    on Sep 2, 2026
  3. added a commit that references this issue on Sep 11, 2026
    d958f5e
  4. github-actions commented on Sep 23, 2026

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #24233, which was included in the 11.0.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugBunjavascriptPull requests that update javascript code

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions