The main purpose of this is to address the issue identified in #128, where if a static route ended in / and a dynamic route began with '/' then WAGI composed a route containing // and it didn't work.
Working on this exposed another (rather embarrassing) bug: if you had a wildcard route /foo/... then it did a starts_with check on the stuff before the slash, so /foobar would match. So this fixes that too (yes, sorry, it is all in one commit, but it wasn't worth teasing apart).
This does NOT close #128 because we still need to look at the AssemblyScript issue.
The main purpose of this is to address the issue identified in #128, where if a static route ended in
/
and a dynamic route began with '/' then WAGI composed a route containing//
and it didn't work.Working on this exposed another (rather embarrassing) bug: if you had a wildcard route
/foo/...
then it did astarts_with
check on the stuff before the slash, so/foobar
would match. So this fixes that too (yes, sorry, it is all in one commit, but it wasn't worth teasing apart).This does NOT close #128 because we still need to look at the AssemblyScript issue.