mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 12:40:24 +03:00
Implement x-amz-acl handling
This commit is contained in:
+12
-1
@@ -38,7 +38,7 @@ type ErrorResponse struct {
|
||||
HostID string
|
||||
}
|
||||
|
||||
// Error codes, non exhaustive list
|
||||
// Error codes, non exhaustive list - http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
|
||||
const (
|
||||
AccessDenied = iota
|
||||
BadDigest
|
||||
@@ -63,6 +63,11 @@ const (
|
||||
TooManyBuckets
|
||||
)
|
||||
|
||||
// Error codes, non exhaustive list - standard HTTP errors
|
||||
const (
|
||||
NotAcceptable = iota + 21
|
||||
)
|
||||
|
||||
// Error code to Error structure map
|
||||
var errorCodeResponse = map[int]Error{
|
||||
AccessDenied: {
|
||||
@@ -170,6 +175,12 @@ var errorCodeResponse = map[int]Error{
|
||||
Description: "You have attempted to create more buckets than allowed.",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
NotAcceptable: {
|
||||
Code: "NotAcceptable",
|
||||
Description: `The requested resource is only capable of generating content
|
||||
not acceptable according to the Accept headers sent in the request.`,
|
||||
HTTPStatusCode: http.StatusNotAcceptable,
|
||||
},
|
||||
}
|
||||
|
||||
// errorCodeError provides errorCode to Error. It returns empty if the code provided is unknown
|
||||
|
||||
Reference in New Issue
Block a user