Add proper router for handling putBucketACLHandler

This commit is contained in:
Harshavardhana
2015-10-07 20:36:36 -07:00
parent e719adec8b
commit d18ca4b40d
7 changed files with 29 additions and 31 deletions
+3 -9
View File
@@ -222,17 +222,11 @@ func (api API) PutBucketHandler(w http.ResponseWriter, req *http.Request) {
<-op.ProceedCh
}
// uncomment this when we have webcli
// without access key credentials one cannot create a bucket
// if _, err := StripAccessKeyID(req); err != nil {
// writeErrorResponse(w, req, AccessDenied, req.URL.Path)
// return
// }
if isRequestBucketACL(req.URL.Query()) {
api.PutBucketACLHandler(w, req)
if _, err := stripAccessKeyID(req.Header.Get("Authorization")); err != nil {
writeErrorResponse(w, req, AccessDenied, req.URL.Path)
return
}
// read from 'x-amz-acl'
aclType := getACLType(req)
if aclType == unsupportedACLType {