Further fixes for ACL support, currently code is disabled in all the handlers

Disabled because due to lack of testing support. Once we get that in we can
uncomment them back.
This commit is contained in:
Harshavardhana
2015-04-22 19:29:39 -07:00
parent 1c0ff2c758
commit 848c4ee31c
8 changed files with 91 additions and 68 deletions
+11 -10
View File
@@ -29,17 +29,18 @@ const (
// Get content type requested from 'Accept' header
func getContentType(req *http.Request) contentType {
acceptHeader := req.Header.Get("Accept")
if acceptHeader != "" {
switch {
case acceptHeader == "application/json":
return jsonContentType
case acceptHeader == "application/xml":
return xmlContentType
default:
return unknownContentType
}
switch {
case acceptHeader == "application/json":
return jsonContentType
case acceptHeader == "application/xml":
return xmlContentType
case acceptHeader == "*/*":
return xmlContentType
case acceptHeader != "":
return unknownContentType
default:
return xmlContentType
}
return xmlContentType
}
// Content type to human readable string