diff --git a/cmd/metacache-walk.go b/cmd/metacache-walk.go index a1b260f2c..9aa2e8a03 100644 --- a/cmd/metacache-walk.go +++ b/cmd/metacache-walk.go @@ -258,12 +258,12 @@ func (s *storageRESTServer) WalkDirHandler(w http.ResponseWriter, r *http.Reques vars := mux.Vars(r) volume := vars[storageRESTVolume] dirPath := vars[storageRESTDirPath] - prefix := vars[storageRESTPrefixFilter] recursive, err := strconv.ParseBool(vars[storageRESTRecursive]) if err != nil { s.writeErrorResponse(w, err) return } + prefix := r.URL.Query().Get(storageRESTPrefixFilter) writer := streamHTTPResponse(w) writer.CloseWithError(s.storage.WalkDir(r.Context(), WalkDirOptions{ Bucket: volume, diff --git a/cmd/storage-rest-server.go b/cmd/storage-rest-server.go index c76292441..d99ae555e 100644 --- a/cmd/storage-rest-server.go +++ b/cmd/storage-rest-server.go @@ -1083,7 +1083,7 @@ func registerStorageRESTHandlers(router *mux.Router, endpointServerSets Endpoint subrouter.Methods(http.MethodPost).Path(storageRESTVersionPrefix + storageRESTMethodVerifyFile).HandlerFunc(httpTraceHdrs(server.VerifyFileHandler)). Queries(restQueries(storageRESTVolume, storageRESTFilePath)...) subrouter.Methods(http.MethodPost).Path(storageRESTVersionPrefix + storageRESTMethodWalkDir).HandlerFunc(httpTraceHdrs(server.WalkDirHandler)). - Queries(restQueries(storageRESTVolume, storageRESTDirPath, storageRESTRecursive, storageRESTPrefixFilter)...) + Queries(restQueries(storageRESTVolume, storageRESTDirPath, storageRESTRecursive)...) } } }