WhatBrokeToday
GTA 6FAQ
Bun

Bun Bun.serve Adds Content-Length 0 to HEAD Responses Without Body

minor

Is it fixed? Not yet.

Ongoing since Nov 19, 12:38 UTC. First reported Nov 19, 12:38 UTC.

What happened

Bun.serve incorrectly adds a Content-Length: 0 header to HEAD responses that have no body and no explicit Content-Length header. Users are affected when executing HEAD requests against Bun servers.

What caused it?

Under active investigation. No report has identified a root cause yet.

No verified workaround yet

None of the linked reports describe a mitigation. This page updates when one appears.

Timeline

  1. Investigating(current)
  2. Workaround available(upcoming)
  3. Resolved(upcoming)
  1. First report on GitHub issue

    Bun.serve adds Content-Length: 0 to HEAD responses without body or explicit Content-Length

    Source

Evidence

1 report · 1 GitHubShow
  1. [1]
    GitHub First report
    Bun.serve adds Content-Length: 0 to HEAD responses without body or explicit Content-Length(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.5+a7733435c What platform is your computer? Linux 7.0.0-42-generic x86_64 What steps can reproduce the bug? using server = Bun.serve({ port: 0, fetch: () => new Response(null, { headers: { "Content-Type": "text/html" } }), }); const res = await fetch(server.url, { method: "HEAD" }); console.log(res.headers.get("content-length")); // "0" What is the expected behavior? No Content-Length header in the HEAD response. The response has no body and no explicit…

    by stefanprobst 0upvotes 1comments

FAQ

What happened in the Bun issue?

Bun.serve incorrectly adds a Content-Length: 0 header to HEAD responses that have no body and no explicit Content-Length header. Users are affected when executing HEAD requests against Bun servers.

What is affected by the Bun issue?

Bun (versions: 1.4.5+a7733435c).

When did the Bun issue start and end?

It started Nov 19, 12:38 UTC and is still ongoing (1 h 53 min so far). This page updates as it develops.

How do I get alerts for Bun?

Subscribe to the Bun RSS feed for every new Bun incident, or connect an AI assistant to WhatBrokeToday over MCP and ask whether Bun is down. Bun feed

Where does this information come from?

WhatBrokeToday collects public status pages, developer community reports and security advisories, groups the ones about the same problem, and links every report under Evidence on this page. This one has 1 report from 1 independent source.