Repository navigation
fix(cli): preserve signed upload content-type headers - #5253
Closed
user-github-me wants to merge 1 commit into
Closed
user-github-me wants to merge 1 commit into
user-github-me wants to merge 1 commit into
Conversation
Collaborator
|
Thanks. We checked the server side, and the direct-upload endpoint always returns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The direct-upload flow adds a lowercase
content-typedefault before spreading the server’s signed headers. If the API returnsContent-Typeor another casing, fetch combines both values; a real HTTP request receivesapplication/zip, application/zip, changing the header that the presigned request requires.Add the ZIP default only when the normalized upload headers contain no content-type key, comparing names case-insensitively. Preserve the server’s values and casing and keep the existing handling of other headers.
Validation: 113 cloud/client and cloud-command tests pass. Five real HTTP upload cases cover title, uppercase, mixed, lowercase, and absent content-type keys; the first three fail on current main. The tests verify the received header value, one header entry, unchanged request bytes, and upload completion. A separate Node 22 HTTP probe confirms the duplicate value before and a single value after. CLI typecheck, repository lint, formatting, and test reachability pass.