Skip to content

fix(publish): handle content-length header properly for asset uploads#1260

Merged
travi merged 2 commits into
masterfrom
local-undici
Jul 1, 2026
Merged

fix(publish): handle content-length header properly for asset uploads#1260
travi merged 2 commits into
masterfrom
local-undici

Conversation

@travi

@travi travi commented Jul 1, 2026

Copy link
Copy Markdown
Member
  • ensure the local undici instance is used instead of the node built-in
  • stop setting content-length manually for asset uploads
  • ensure content-length is still set automatically

fixes #1224

but ensure that it is still set automatically in the resulting request

for #1224
@travi travi requested a review from a team July 1, 2026 05:32
@travi travi changed the title fix(local-undici): always use the locally installed undici instead of the node built-in version handle content-length header properly for asset uploads Jul 1, 2026
@babblebey babblebey changed the title handle content-length header properly for asset uploads fix(publish): handle content-length header properly for asset uploads Jul 1, 2026

@babblebey babblebey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 😉

My only curious ask is why we were setting the content-length header in the first place... and is it better to no longer set it than to coarse the size value to a string hence meeting the type requirement?? 🤔

@travi

travi commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

My only curious ask is why we were setting the content-length header in the first place... and is it better to no longer set it than to coarse the size value to a string hence meeting the type requirement?? 🤔

its unclear to me when this began to be set automatically, so my assumption is that it was necessary originally. since it is automatic now, that is better than us handling it manually

@travi travi merged commit 28e3741 into master Jul 1, 2026
8 checks passed
@travi travi deleted the local-undici branch July 1, 2026 15:25
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 12.0.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Publishing on GitHub is broken

3 participants