mirror of
https://github.com/minio/minio.git
synced 2025-01-25 21:53:16 -05:00
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 <anis@min.io>
This commit is contained in:
parent
bab72f6887
commit
c8cf4c5eb8
@ -282,7 +282,7 @@ func (s *storageRESTServer) DeleteVolHandler(w http.ResponseWriter, r *http.Requ
|
|||||||
}
|
}
|
||||||
vars := mux.Vars(r)
|
vars := mux.Vars(r)
|
||||||
volume := vars[storageRESTVolume]
|
volume := vars[storageRESTVolume]
|
||||||
forceDelete := vars[storageRESTForceDelete] == "true"
|
forceDelete := r.URL.Query().Get(storageRESTForceDelete) == "true"
|
||||||
err := s.storage.DeleteVol(r.Context(), volume, forceDelete)
|
err := s.storage.DeleteVol(r.Context(), volume, forceDelete)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s.writeErrorResponse(w, err)
|
s.writeErrorResponse(w, err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user