Allow * and : in path segments.
The router now allows path segments containing asterisks and colons that are not wildcards. A *
or :
at the beginning of a path segment must be backslash escaped, like so: router.GET("\\*asteriskpath", handler)
. The backslash should not be included if it occurs anywhere else in the path, e.g. router.GET("aaa*bbb", handler)
as it only checks at the beginning.
Breaking Changes
- The router no longer panics if you add a path segment containing
:
or*
in the middle of the segment. - Path segments starting with two backslashes will be unescaped to start with a single backslash. That is,
router.GET("\\\\abc")
should now berouter.GET("\\\\\\abc")
.