[PR #440] [CLOSED] Add delete routes #613

Closed
opened 2026-03-03 12:30:50 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/440
Author: @kmgreen2
Created: 3/2/2021
Status: Closed

Base: mainHead: add-delete-route


📝 Commits (4)

📊 Changes

3 files changed (+27 additions, -2 deletions)

View changed files

📝 examples/go/main.go (+21 -1)
📝 fakestorage/server.go (+5 -0)
📝 go.mod (+1 -1)

📄 Description

I am not sure if others are hitting this, but I consistently got 405 whenever I tried issuing deletes using the official Golang GCS SDK.

Looking closer at the code, it seems like some of the routers are not in use? In buildMuxer() (server.go:189), I see that routers is allocated, but never used. Furthermore, I only see the routers defined on server.go:213 through server.go:225 when inspecting/debugging mux.go:136 (mux:v1.8.0).

What is the intention of server.go:198? Should that be removed, or am I missing a side-effect. If there is a side-effect associated with routers, I would suggest you directly define those routes.

In any case, deletes are returning a 405 because the server cannot find a route. Since I am not sure of the intention of server.go:198, I have added new delete routes directly to s.mux, which fixes the issue.


🔄 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/440 **Author:** [@kmgreen2](https://github.com/kmgreen2) **Created:** 3/2/2021 **Status:** ❌ Closed **Base:** `main` ← **Head:** `add-delete-route` --- ### 📝 Commits (4) - [`32a841a`](https://github.com/fsouza/fake-gcs-server/commit/32a841a6d3785a17345d240c729f24ca2fc2d0a2) Adding delete route - [`64b4809`](https://github.com/fsouza/fake-gcs-server/commit/64b480931d2d1de7ac706c6b49fa90acd64360ec) Update module name - [`4d574d2`](https://github.com/fsouza/fake-gcs-server/commit/4d574d29511e18b51ee4a825abbd3d85eb3dc87b) Adding another DELETE path - [`0c51fa1`](https://github.com/fsouza/fake-gcs-server/commit/0c51fa1090e36178190d7965af951a458f2cd09a) Adding new routes for list endpoint ### 📊 Changes **3 files changed** (+27 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `examples/go/main.go` (+21 -1) 📝 `fakestorage/server.go` (+5 -0) 📝 `go.mod` (+1 -1) </details> ### 📄 Description I am not sure if others are hitting this, but I consistently got 405 whenever I tried issuing deletes using the official Golang GCS SDK. Looking closer at the code, it seems like some of the routers are not in use? In `buildMuxer()` (server.go:189), I see that `routers` is allocated, but never used. Furthermore, I only see the routers defined on server.go:213 through server.go:225 when inspecting/debugging mux.go:136 (`mux:v1.8.0`). What is the intention of `server.go:198`? Should that be removed, or am I missing a side-effect. If there is a side-effect associated with routers, I would suggest you directly define those routes. In any case, deletes are returning a 405 because the server cannot find a route. Since I am not sure of the intention of `server.go:198`, I have added new delete routes directly to `s.mux`, which fixes the issue. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:30:50 +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#613
No description provided.