Implement presigned policy

This commit is contained in:
Harshavardhana
2015-10-01 23:51:17 -07:00
parent 09dc360e06
commit c8de5bad2f
18 changed files with 560 additions and 240 deletions

View File

@@ -70,11 +70,12 @@ const (
InvalidPart
InvalidPartOrder
AuthorizationHeaderMalformed
MalformedPOSTRequest
)
// Error codes, non exhaustive list - standard HTTP errors
const (
NotAcceptable = iota + 30
NotAcceptable = iota + 31
)
// APIError code to Error structure map
@@ -229,6 +230,11 @@ var errorCodeResponse = map[int]APIError{
Description: "The authorization header is malformed; the region is wrong; expecting 'milkyway'.",
HTTPStatusCode: http.StatusBadRequest,
},
MalformedPOSTRequest: {
Code: "MalformedPOSTRequest",
Description: "The body of your POST request is not well-formed multipart/form-data.",
HTTPStatusCode: http.StatusBadRequest,
},
}
// errorCodeError provides errorCode to Error. It returns empty if the code provided is unknown