From 12c92dbfce3e366b8ba00fbdcb04c34e0911123a Mon Sep 17 00:00:00 2001 From: wang yan Date: Thu, 2 Jul 2020 13:42:38 +0800 Subject: [PATCH] fix delete manifest route issue The repository name contains blackslash, the mux router has to use the * to match the blackslash. Otherwise the caller(gc job) will get a 404. Signed-off-by: wang yan --- src/registryctl/handlers/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registryctl/handlers/router.go b/src/registryctl/handlers/router.go index 8c5b34427..274d80d8f 100644 --- a/src/registryctl/handlers/router.go +++ b/src/registryctl/handlers/router.go @@ -33,6 +33,6 @@ func newRouter(conf config.Configuration) http.Handler { rootRouter.Path("/api/registry/gc").Methods(http.MethodPost).Handler(gc.NewHandler(conf.RegistryConfig)) rootRouter.Path("/api/registry/blob/{reference}").Methods(http.MethodDelete).Handler(blob.NewHandler(conf.StorageDriver)) - rootRouter.Path("/api/registry/{name}/manifests/{reference}").Methods(http.MethodDelete).Handler(manifest.NewHandler(conf.StorageDriver)) + rootRouter.Path("/api/registry/{name:.*}/manifests/{reference}").Methods(http.MethodDelete).Handler(manifest.NewHandler(conf.StorageDriver)) return rootRouter }