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
I've just found this another surprising behavior when writing a simple Hanami app, this time related to trailing slashes:
router=Hanami::Router.newdoget"/users",to: ->_{[200,{},['index users']]}get"/users/:id",to: ->_{[200,{},['show user']]}end# without trailing slash it works as expectedrouter.call(Rack::MockRequest.env_for("/users"))# => [200, {}, ["index users"]]# with trailing slash, I get a 404router.call(Rack::MockRequest.env_for("/users/"))# => [404, {"Content-Length"=>"9"}, ["Not Found"]]# interestingly, the show route works just finerouter.call(Rack::MockRequest.env_for("/users/1/"))=>[200,{},["show user"]]
Version used: 2.0.2
The text was updated successfully, but these errors were encountered:
Hello!
I've just found this another surprising behavior when writing a simple Hanami app, this time related to trailing slashes:
Version used: 2.0.2
The text was updated successfully, but these errors were encountered: