Implement x-amz-acl handling

This commit is contained in:
Harshavardhana
2015-04-22 16:28:13 -07:00
parent 28785421cd
commit 107e077ec0
9 changed files with 182 additions and 34 deletions
+9 -3
View File
@@ -24,7 +24,8 @@ import (
type contentType int
const (
xmlContentType contentType = iota
unknownContentType contentType = iota
xmlContentType
jsonContentType
)
@@ -34,8 +35,10 @@ func getContentType(req *http.Request) contentType {
switch {
case strings.HasPrefix(acceptHeader, "application/json"):
return jsonContentType
default:
case strings.HasPrefix(acceptHeader, "application/xml"):
return xmlContentType
default:
return unknownContentType
}
}
@@ -44,9 +47,12 @@ func getContentTypeString(content contentType) string {
switch content {
case jsonContentType:
{
return "application/json"
}
case xmlContentType:
{
return "application/xml"
}
default:
{
return "application/xml"