Adding handler for listing objects to both trailing and non-trailing url

This commit is contained in:
Frederick F. Kautz IV 2015-01-20 19:10:52 -08:00
parent a7029206ff
commit 3026f77cfc

View File

@ -26,6 +26,7 @@ func HttpHandler(storage *mstorage.Storage) http.Handler {
storage: storage,
}
mux.HandleFunc("/", api.listBucketsHandler).Methods("GET")
mux.HandleFunc("/{bucket}", api.listObjectsHandler).Methods("GET")
mux.HandleFunc("/{bucket}/", api.listObjectsHandler).Methods("GET")
mux.HandleFunc("/{bucket}/{object:.*}", api.getObjectHandler).Methods("GET")
mux.HandleFunc("/{bucket}/{object:.*}", api.putObjectHandler).Methods("PUT")