From c8cf4c5eb8ee20f21ec8ae014b34b1d8709356b7 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Fri, 9 Jul 2021 21:29:38 +0100 Subject: [PATCH] Fix force bucket deletion in distributed mode (#12659) storageRESTForceDelete is not always passed by client, use r.URL().Query instead. Co-authored-by: Anis Elleuch --- cmd/storage-rest-server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/storage-rest-server.go b/cmd/storage-rest-server.go index 0ab761b80..7308af8bb 100644 --- a/cmd/storage-rest-server.go +++ b/cmd/storage-rest-server.go @@ -282,7 +282,7 @@ func (s *storageRESTServer) DeleteVolHandler(w http.ResponseWriter, r *http.Requ } vars := mux.Vars(r) volume := vars[storageRESTVolume] - forceDelete := vars[storageRESTForceDelete] == "true" + forceDelete := r.URL.Query().Get(storageRESTForceDelete) == "true" err := s.storage.DeleteVol(r.Context(), volume, forceDelete) if err != nil { s.writeErrorResponse(w, err)