Limit memory mode at 100 buckets and return error appropriately

~~~
mc: <ERROR> Failed to create bucket for URL [http://localhost:9000/newbucket-101]. Reason: [You have attempted to create more buckets than allowed.].
~~~

Response from server
This commit is contained in:
Harshavardhana
2015-04-26 21:15:43 -07:00
parent f20515b4ed
commit 8beca83090
5 changed files with 26 additions and 1 deletions
+4
View File
@@ -171,6 +171,10 @@ func (server *minioAPI) putBucketHandler(w http.ResponseWriter, req *http.Reques
w.Header().Set("Connection", "close")
w.WriteHeader(http.StatusOK)
}
case drivers.TooManyBuckets:
{
writeErrorResponse(w, req, TooManyBuckets, acceptsContentType, req.URL.Path)
}
case drivers.BucketNameInvalid:
{
writeErrorResponse(w, req, InvalidBucketName, acceptsContentType, req.URL.Path)