Add delete handlers and reply back as 'NotImplemented' instead of 404

This commit is contained in:
Harshavardhana
2015-06-08 11:06:06 -07:00
parent 69366e20d3
commit 8efc842b59
2 changed files with 27 additions and 4 deletions
+6
View File
@@ -65,6 +65,12 @@ func HTTPHandler(config Config) http.Handler {
mux.HandleFunc("/{bucket}/{object:.*}", api.getObjectHandler).Methods("GET")
mux.HandleFunc("/{bucket}/{object:.*}", api.putObjectHandler).Methods("PUT")
// not implemented yet
mux.HandleFunc("/{bucket}", api.deleteBucketHandler).Methods("DELETE")
// unsupported API
mux.HandleFunc("/{bucket}/{object:.*}", api.deleteObjectHandler).Methods("DELETE")
handler := validContentTypeHandler(mux)
handler = timeValidityHandler(handler)
handler = ignoreResourcesHandler(handler)