mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-26 06:05:54 +03:00
[GH-ISSUE #206] "prefixes" key is always in the response of Object:list even if it's empty. #35
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#35
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 @reppets on GitHub (Mar 25, 2020).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/206
version 1.18 (dockerhub image)
The responses of /storage/v1/b/bucket/o (Object: list) on the fake server have always "prefixes" key even when it's empty, while the genuine server's responses are without that key.
If "prefixes" is empty, fake-gcs-server returns "prefixes" key with an empty array.
For example (using Google's public bucket gs://gcp-public-data-landsat/ and same directory structure for fake-gcs-server)
The fake-gcs-server response is
And here are examples of the GCS response below
1. without delimiter option
https://storage.googleapis.com/storage/v1/b/gcp-public-data-landsat/o?prefix=LC08%2f01%2f001%2f002%2fLC08_L1GT_001002_20160817_20170322_01_T2%2f
returns
"prefixes" key is not present.
2. with delimiter option matches nothing
https://storage.googleapis.com/storage/v1/b/gcp-public-data-landsat/o?delimiter=nomatch&prefix=LC08%2f01%2f001%2f002%2fLC08_L1GT_001002_20160817_20170322_01_T2%2f
returns the same response as 1.
3. with delimeter option matches some files
https://storage.googleapis.com/storage/v1/b/gcp-public-data-landsat/o?delimiter=.TIF&prefix=LC08%2f01%2f001%2f002%2fLC08_L1GT_001002_20160817_20170322_01_T2%2f
returns
has "prefix" key with values.
@fsouza commented on GitHub (Mar 25, 2020):
Thanks for reporting! Just pushed a fix and tagged 1.18.1.
@reppets commented on GitHub (Mar 25, 2020):
Thank you for the fix and such a quick response!