thruster-rs / Thruster

A fast, middleware based, web framework written in Rust
MIT License
1.06k stars 47 forks source link

bug: Fix optimized route issue #117

Closed trezm closed 5 years ago

trezm commented 5 years ago

Issue: If you have a route such as /test/:id, then curling /test will cause an end of cycle error.

Solution: This was happening, and wasn't caught by our tests, because of the optimization hash that we use to short circuit the route tree. Now we'll make sure that the route is a terminal non-wildcard route before adding it to the optimized tree. Also updated the enumerate method for nodes to return more useful information.

Should resolve #116