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:
Anis Elleuch 2021-07-09 21:29:38 +01:00 committed by GitHub
parent bab72f6887
commit c8cf4c5eb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)