chi icon indicating copy to clipboard operation
chi copied to clipboard

middleware.CleanPath doesn't work with other routers

Open romain-tadiello opened this issue 2 years ago • 0 comments

The rctx is not checked and could be nil if the function isn't used with a chi.Router. It ends up in a panic.

PR: #786

Additional point: the cleaning only happens in the rctx.RoutePath is an empty string. If a function like GetHead is called before it won't clean the path.

romain-tadiello avatar Jan 27 '23 13:01 romain-tadiello