Repository navigation
fix(desktop): avoid duplicate content type in signed uploads - #3463
Open
bestgopher wants to merge 1 commit into
Open
bestgopher wants to merge 1 commit into
bestgopher wants to merge 1 commit into
Conversation
Use the server-provided Content-Type when present and infer a fallback only when it is absent, matching header names case-insensitively. This prevents RustFS from rejecting Instant metadata and thumbnail PUTs with InvalidRequest due to duplicate Content-Type headers. Extract request construction for regression tests covering header casing, fallback MIME types, additional headers, and Google Drive content ranges. Validation: two extracted regression tests and real RustFS uploads pass. Full desktop cargo check is blocked by the missing local zed-cap checkout. Closes CapSoftware#3462 Fixes:[CapSoftware#3462] Signed-off-by: bestgopher <84328409@qq.com>
Contributor
|
@bestgopher is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Native Instant uploads add a local
Content-Typeand then append the same header from the signed upload target. RustFS 1.0.3 rejects these PUTs with400 InvalidRequest: duplicate header: content-type, leaving manifest, metadata, and thumbnail uploads incomplete even after video segments have uploaded.Use the server-provided content type when present, matching header names case-insensitively, and infer a MIME type only when it is absent. Extract request construction for regression tests covering header casing, supplied MIME precedence, fallback types, additional headers, request bodies, and Google Drive content ranges.
Validation:
200 OKwith the fixed builder.git diff --checkpassed.Full desktop
cargo checkis blocked by a missing localzed-capcheckout. The complete patched GUI has not yet been rebuilt and retested; the real upload verification used the extracted production request builder.Closes #3462


Confidence Score: 5/5
The PR appears safe to merge.Summary
Prevents duplicate
Content-Typeheaders in native signed uploads.No actionable issues found. Review was static; tests were not run.
Reviews (1) · Last reviewed commit: "fix(desktop): avoid duplicate content ty..." · Reviewed by Greptile