You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that sub-routers are not properly matched after I applied middleware.SupressNotFound.
I investigated this and apparently rctx.RoutePath is modified without being restored in middleware.SupressNotFound.
This should be reproducible from the snippet I posted below.
Action
Expected Behavior
Go to http://localhost:8889/example/sub/hello
I should get "Hello World".
Console should print "Route path /sub/hello"
Actual
Go to http://localhost:8889/example/sub/hello
Instead I got "404 page not found" with 404 status. This is returned by the sub router, not the middleware.
Console printed "Route path /hello"
Actual result can be obtained by removing middleware.SupressNotFound.
Description
It seems that sub-routers are not properly matched after I applied
middleware.SupressNotFound
.I investigated this and apparently
rctx.RoutePath
is modified without being restored inmiddleware.SupressNotFound
.This should be reproducible from the snippet I posted below.
Action
Expected Behavior
http://localhost:8889/example/sub/hello
Actual
http://localhost:8889/example/sub/hello
Actual result can be obtained by removing
middleware.SupressNotFound
.Code
The text was updated successfully, but these errors were encountered: