mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 21:55:56 +03:00
[PR #1182] [MERGED] multipart uploads: Hack to support gsutil cp #1266
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#1266
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fsouza/fake-gcs-server/pull/1182
Author: @ekimekim
Created: 5/26/2023
Status: ✅ Merged
Merged: 5/27/2023
Merged by: @fsouza
Base:
main← Head:gsutil-hack📝 Commits (2)
9134d76multipart uploads: Hack to support gsutil cp7404445Use ` to avoid having to escape📊 Changes
1 file changed (+12 additions, -1 deletions)
View changed files
📝
fakestorage/upload.go(+12 -1)📄 Description
gsutilsends an invalid multipart boundary param, which golang'smime.ParseMediaTypecorrectly rejects.However, the real GCS evidently does not reject this, so in order to make
gsutilwork we need to support it.In particular,
gsutilsends a boundary param that is quoted using single-quotes when it should be using double-quotes.In cases where the param is definitely invalid (so we're guarenteed not to break any valid values), we replace all single-quotes with double-quotes to produce the intended meaning.
Upstream bug: https://github.com/GoogleCloudPlatform/gsutil/issues/1466
Fixes https://github.com/fsouza/fake-gcs-server/issues/217
The above issue found this bug and worked around it, but found another problem and never submitted the fix.
It seems that in the intervening time, the other problem was fixed independently, and I can successfully
gsutil cpusing this code.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
itemsif empty in object list response #1342