From 4e6e05f8e02e4f4d85f8e2d2491f5a9af1c24752 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Wed, 9 Jan 2019 07:29:41 +0100 Subject: [PATCH] virtual host: Fix making new buckets (#7054) This commit removes old code preventing PUT requests with '/' as a path, because this is not needed anymore after the introduction of the virtual host style in Minio server code. 'PUT /' when global domain is not configured already returns 405 Method Not Allowed http error. --- cmd/generic-handlers.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cmd/generic-handlers.go b/cmd/generic-handlers.go index 2f6012efc..a7d4960e1 100644 --- a/cmd/generic-handlers.go +++ b/cmd/generic-handlers.go @@ -496,11 +496,6 @@ func (h resourceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } } - // A put method on path "/" doesn't make sense, ignore it. - if r.Method == http.MethodPut && r.URL.Path == "/" { - writeErrorResponse(w, ErrNotImplemented, r.URL, guessIsBrowserReq(r)) - return - } // Serve HTTP. h.handler.ServeHTTP(w, r)