mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-26 06:05:54 +03:00
[GH-ISSUE #1967] Reumable uploads lose preconditions #236
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#236
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?
Originally created by @patricklucas on GitHub (May 17, 2025).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1967
Supported preconditions such as
ifGenerationMatchdo not get enforced for resumable uploads, as they are (correctly) not checked on the initial request to create the upload object, and are not passed tocreateObjectupon commit.Looking into the behavior of the GCS Java SDK, I found that the behavior is that the server, in response to the POST to create the upload, includes the original preconditions in the query string of the returned location, and the client includes them on the subsequent PUTs.
That's fairly easily done here as well, including them here. I've tested this and it works as expected, with resumable uploads to an existing object that include
ifGenerationMatch=0fail with code 412.