storage: Upgrade REST version after adding WriteAll API (#6819)

Rolling update doesn't work properly because Storage REST API has
a new API WriteAll() but without API version number increase.

Also be sure to return 404 for unknown http paths.
master
Anis Elleuch 6 years ago committed by kannappanr
parent 712abc7958
commit 1c24c93f73
  1. 2
      cmd/storage-rest-common.go
  2. 1
      cmd/storage-rest-server.go

@ -16,7 +16,7 @@
package cmd
const storageRESTVersion = "v1"
const storageRESTVersion = "v2"
const storageRESTPath = minioReservedBucketPath + "/storage/" + storageRESTVersion + "/"
const (

@ -378,5 +378,6 @@ func registerStorageRESTHandlers(router *mux.Router, endpoints EndpointList) {
subrouter.Methods(http.MethodPost).Path("/" + storageRESTMethodRenameFile).HandlerFunc(httpTraceHdrs(server.RenameFileHandler)).
Queries(restQueries(storageRESTSrcVolume, storageRESTSrcPath, storageRESTDstVolume, storageRESTDstPath)...)
subrouter.NotFoundHandler = http.HandlerFunc(httpTraceAll(notFoundHandler))
}
}

Loading…
Cancel
Save