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.
This commit is contained in:
Anis Elleuch 2019-01-09 07:29:41 +01:00 committed by Harshavardhana
parent b0deea27df
commit 4e6e05f8e0

View File

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