AmbitionFramework / ambition

The Ambition MVC Framework for Vala
http://www.ambitionframework.org
Apache License 2.0
32 stars 4 forks source link

Sane path handler #20

Open nmelnick opened 2 years ago

nmelnick commented 2 years ago

Path handling in Ambition is done by converting a stated path to a regular expression, and running regular expressions against an inbound path on each request. This is mildly insane. It's an ideal way to get started, but is subject to issues like order of operations and silent failures due to regular expression special characters.

Refactor the path handler to parse segments. Provide a runtime validator when adding routes so bad paths aren't failing silently.