HTTP routing: fix regex
HTTP routing: fix regex: a task in smol-software-harbor (Harbor dataset). The router in src/router.php sends /posts/42/edit to show post , because the regular expression built by compile route() does not have to match the whole path, and a parameter can swallow slashes. Routes must match the…
The task
The router in `src/router.php` sends `/posts/42/edit` to `show_post`, because the regular expression built by `compile_route()` does not have to match the whole path, and a parameter can swallow slashes. Routes must match the entire path (an optional trailing slash is fine) and `{name}` captures exactly one segment.…
Part of efederici/smol-software-harbor.