When matching a catch all path by name, should reitit url encode the path? It seems like it should not. Below is the actual result.
(r/match->path
(r/match-by-name
(r/router ["/a/{*rest}" ::a])
::a
{:rest "foo/bar"}))
=> "/a/foo%2Fbar"
I would’ve expected “/a/foo/bar”fyi, made an issue for this https://github.com/metosin/reitit/issues/432
good catch. How do other routing libs handle that?
what if you give {:rest "foo/bar?a=1"}
?
I’m not sure how they handle it.
(r/match->path
(r/match-by-name
(r/router ["/a/{*rest}" ::a])
::a
{:rest "foo/bar?a=1"}))
=> "/a/foo%2Fbar%3Fa%3D1"