stretchr / goweb

A lightweight RESTful web framework for Go
632 stars 61 forks source link

Optional path segments before static path segments should be an error #37

Open tylerstillwater opened 11 years ago

tylerstillwater commented 11 years ago

Having /something/[optional]/else currently works, but makes no sense. An optional segment should not be allowed to appear before a static segment.

matryer commented 11 years ago

Can you write a test to see what it matches?

I have a feeling it will ignore the "else" bit entirely - in which case we should throw an error.

Sent from my iPhone

On 10 Jul 2013, at 16:33, Tyler notifications@github.com wrote:

Having /something/[optional]/else currently works, but makes no sense. An optional segment should not be allowed to appear before a static segment.

— Reply to this email directly or view it on GitHub.