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.
master
Anis Elleuch 6 years ago committed by Harshavardhana
parent b0deea27df
commit 4e6e05f8e0
  1. 5
      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)

Loading…
Cancel
Save