[PR #1252] [MERGED] Support trailing slash in /o and /b routes #1329

Closed
opened 2026-03-03 12:34:06 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/1252
Author: @manuteleco
Created: 7/17/2023
Status: Merged
Merged: 7/30/2023
Merged by: @fsouza

Base: mainHead: support_trailing_slash_in_o_route


📝 Commits (1)

  • 1a95981 Support trailing slash in /o and /b routes

📊 Changes

1 file changed (+5 additions, -0 deletions)

View changed files

📝 fakestorage/server.go (+5 -0)

📄 Description

Support trailing slash in /o and /b routes

For example, support this new route:

  • /upload/storage/v1/b/{bucketName}/o/

on top of (and as alias to) the existing official route:

  • /upload/storage/v1/b/{bucketName}/o

Some client libraries (like googleCloudStorageR) rely on these
alternative route variants. Therefore, some operations like uploading
objects didn't work with fake-gcs-server.

Even though the Google Storage API reference documentation only
talks about the /o variant, it also works with /o/.

The same applies to the other operations defined on /o and /b
routes (listing/creating objects/buckets).

Supporting /o/ and /b/ here brings fake-gcs-server closer to the
actual behavior of the API and adds compatibility with additional client
libraries.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fsouza/fake-gcs-server/pull/1252 **Author:** [@manuteleco](https://github.com/manuteleco) **Created:** 7/17/2023 **Status:** ✅ Merged **Merged:** 7/30/2023 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `main` ← **Head:** `support_trailing_slash_in_o_route` --- ### 📝 Commits (1) - [`1a95981`](https://github.com/fsouza/fake-gcs-server/commit/1a95981e1a421b5ae17c57862a7eabc84d75c641) Support trailing slash in `/o` and `/b` routes ### 📊 Changes **1 file changed** (+5 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/server.go` (+5 -0) </details> ### 📄 Description Support trailing slash in `/o` and `/b` routes For example, support this new route: * `/upload/storage/v1/b/{bucketName}/o/` on top of (and as alias to) the existing official route: * `/upload/storage/v1/b/{bucketName}/o` Some client libraries (like `googleCloudStorageR`) rely on these alternative route variants. Therefore, some operations like uploading objects didn't work with `fake-gcs-server`. Even though the Google Storage API reference [documentation][1] only talks about the `/o` variant, it also works with `/o/`. The same applies to the other operations defined on `/o` and `/b` routes (listing/creating objects/buckets). Supporting `/o/` and `/b/` here brings `fake-gcs-server` closer to the actual behavior of the API and adds compatibility with additional client libraries. [1]: https://cloud.google.com/storage/docs/json_api/v1/objects/insert --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:34:06 +03:00
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#1329
No description provided.