[GH-ISSUE #1014] Incorrectly handles object download without URL encoded names #157

Open
opened 2026-03-03 12:08:48 +03:00 by kerem · 0 comments
Owner

Originally created by @nsweeting on GitHub (Dec 16, 2022).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1014

We hit this when some of our client code was not setup correctly. As mentioned here

OBJECT_NAME is the URL-encoded name of the object you are downloading. For example, pets/dog.png, URL-encoded as pets%2Fdog.png.

Currently fake-gcs-server honours requests without URL encoded object names. For example:

time="2022-12-16T18:16:28Z" level=info msg="172.22.0.1 - - [16/Dec/2022:18:16:28 +0000] \"GET /download/storage/v1/b/bucket/o/foo=bar.txt?alt=media HTTP/1.1\" 200 7"

This should return a 404 like GCS.

Originally created by @nsweeting on GitHub (Dec 16, 2022). Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1014 We hit this when some of our client code was not setup correctly. As mentioned [here](https://cloud.google.com/storage/docs/downloading-objects) ``` OBJECT_NAME is the URL-encoded name of the object you are downloading. For example, pets/dog.png, URL-encoded as pets%2Fdog.png. ``` Currently fake-gcs-server honours requests without URL encoded object names. For example: ``` time="2022-12-16T18:16:28Z" level=info msg="172.22.0.1 - - [16/Dec/2022:18:16:28 +0000] \"GET /download/storage/v1/b/bucket/o/foo=bar.txt?alt=media HTTP/1.1\" 200 7" ``` This should return a 404 like GCS.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#157
No description provided.