cleanup: Remove definitions and move them to its relative places accordingly

- Move fs-definitions.go and break them into fs-datatypes.go, fs-bucket-acl.go
  and fs-utils.go
- Move api-definitions.go to api-response.go, where they should be.
- Move web-definitions to its related handlers.
This commit is contained in:
Harshavardhana
2016-02-19 16:04:29 -08:00
parent d3966d1dde
commit 800b19d8e5
14 changed files with 358 additions and 457 deletions
+24 -4
View File
@@ -248,8 +248,7 @@ func (h resourceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// Checks requests for not implemented Bucket resources
func ignoreNotImplementedBucketResources(req *http.Request) bool {
q := req.URL.Query()
for name := range q {
for name := range req.URL.Query() {
if notimplementedBucketResourceNames[name] {
return true
}
@@ -259,11 +258,32 @@ func ignoreNotImplementedBucketResources(req *http.Request) bool {
// Checks requests for not implemented Object resources
func ignoreNotImplementedObjectResources(req *http.Request) bool {
q := req.URL.Query()
for name := range q {
for name := range req.URL.Query() {
if notimplementedObjectResourceNames[name] {
return true
}
}
return false
}
// List of not implemented bucket queries
var notimplementedBucketResourceNames = map[string]bool{
"policy": true,
"cors": true,
"lifecycle": true,
"logging": true,
"notification": true,
"replication": true,
"tagging": true,
"versions": true,
"requestPayment": true,
"versioning": true,
"website": true,
}
// List of not implemented object queries
var notimplementedObjectResourceNames = map[string]bool{
"torrent": true,
"acl": true,
"policy": true,
}