From 26aac9a439b6f5fb4cb23747589bb9b1dd700e84 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 31 Jan 2015 22:44:12 -0800 Subject: [PATCH] Add bucket resources to ignore handler --- pkg/webapi/minioapi/minioapi.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/webapi/minioapi/minioapi.go b/pkg/webapi/minioapi/minioapi.go index a036a6e96..9b2bcc2da 100644 --- a/pkg/webapi/minioapi/minioapi.go +++ b/pkg/webapi/minioapi/minioapi.go @@ -61,12 +61,12 @@ func HttpHandler(storage mstorage.Storage) http.Handler { mux.HandleFunc("/{bucket}/{object:.*}", api.headObjectHandler).Methods("HEAD") mux.HandleFunc("/{bucket}/{object:.*}", api.putObjectHandler).Methods("PUT") - return ignoreUnimplementedBucketResources(mux) + return ignoreUnimplementedResources(mux) } -func ignoreUnimplementedBucketResources(h http.Handler) http.Handler { +func ignoreUnimplementedResources(h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if ignoreUnImplementedObjectResources(r) { + if ignoreUnImplementedObjectResources(r) || ignoreUnImplementedBucketResources(r) { w.WriteHeader(http.StatusNotImplemented) } else { h.ServeHTTP(w, r)