mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
Register notFound handler only once per root router (#6926)
registering notFound handler more than once causes gorilla mux to return error for all registered paths greater than > 8. This might be a bug in the gorilla/mux but we shouldn't be using it this way. NotFound handler should be only registered once per root router. Fixes #6915
This commit is contained in:
parent
4e6d3c093f
commit
8fcc787cba
@ -377,7 +377,7 @@ func registerStorageRESTHandlers(router *mux.Router, endpoints EndpointList) {
|
||||
Queries(restQueries(storageRESTVolume, storageRESTFilePath)...)
|
||||
subrouter.Methods(http.MethodPost).Path("/" + storageRESTMethodRenameFile).HandlerFunc(httpTraceHdrs(server.RenameFileHandler)).
|
||||
Queries(restQueries(storageRESTSrcVolume, storageRESTSrcPath, storageRESTDstVolume, storageRESTDstPath)...)
|
||||
|
||||
subrouter.NotFoundHandler = http.HandlerFunc(httpTraceAll(notFoundHandler))
|
||||
}
|
||||
|
||||
router.NotFoundHandler = http.HandlerFunc(httpTraceAll(notFoundHandler))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user