diff --git a/lib/fakes3/server.rb b/lib/fakes3/server.rb index 47a44564..899f7212 100644 --- a/lib/fakes3/server.rb +++ b/lib/fakes3/server.rb @@ -341,8 +341,9 @@ def normalize_delete(webrick_req,s_req) end if elems.size == 0 - raise UnsupportedOperation - elsif elems.size == 1 + raise UnsupportedOperation unless s_req.bucket + s_req.type = Request::DELETE_BUCKET + elsif (elems.size == 1) && s_req.is_path_style s_req.type = Request::DELETE_BUCKET s_req.query = query else