Skip to content

Conversation

@robobun
Copy link
Collaborator

@robobun robobun commented Jan 27, 2026

Summary

  • Fixes user-provided Content-Length headers being stripped when the request body is a stream (async generator or ReadableStream)
  • Bun now uses the user-provided Content-Length instead of replacing it with Transfer-Encoding: chunked

Test plan

  • Added regression tests in test/regression/issue/18854.test.ts:
    • Test that Content-Length is preserved with async generator body
    • Test that Content-Length is preserved with ReadableStream body
    • Test that chunked encoding is still used when no Content-Length is provided

Fixes #18854

🤖 Generated with Claude Code

When a user explicitly provides a Content-Length header with a streaming
body (async generator or ReadableStream), Bun now respects it instead of
replacing it with Transfer-Encoding: chunked.

This is required for services like Azure Storage that compute authentication
signatures (HMAC) based on the Content-Length header value. When Bun replaced
the user-provided Content-Length with chunked encoding, the server's computed
signature wouldn't match, causing authentication failures.

Fixes #18854

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Warning

Rate limit exceeded

@robobun has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 39 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.


Comment @coderabbitai help to get the list of available commands and usage tips.

@robobun
Copy link
Collaborator Author

robobun commented Jan 27, 2026

Updated 2:50 AM PT - Jan 27th, 2026

❌ Your commit ce7394ea has 6 failures in Build #35936 (All Failures):


🧪   To try this PR locally:

bunx bun-pr 26490

That installs a local version of the PR into your bun-26490 executable, so you can run:

bun-26490 --bun

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File upload issue with @azure/storage-file-datalake

2 participants