Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please show an example julienschmidt/httprouter cannot handle #1

Closed
tv42 opened this issue Jun 5, 2014 · 3 comments
Closed

Please show an example julienschmidt/httprouter cannot handle #1

tv42 opened this issue Jun 5, 2014 · 3 comments

Comments

@tv42
Copy link

tv42 commented Jun 5, 2014

I'm still confused after reading the README and skimming the code. It seemed like you were implying Julien's code doesn't support /foo/:a/bar/:b, but that seems to work just fine.

@dimfeld
Copy link
Owner

dimfeld commented Jun 5, 2014

Sorry if it was unclear. The difference only shows up when more than one route is in use. httptreemux supports simultaneously having routes such as:

  • /foo/:a/bar/:b
  • /foo/abc/:d

httprouter will complain that :a and abc conflict, as a path segment containing a wildcard is not allowed to contain anything else. I should note that this limitation in Julien's code is by design, not a flaw, as he wanted to keep the routing rules simple.

Hope that makes sense. Please let me know if it doesn't and I'll come up with some other examples.

@dimfeld
Copy link
Owner

dimfeld commented Jun 5, 2014

I also just changed the README to be a bit more clear. Closing this for now, but feel free to reopen if you still feel it's confusing. Thanks!

@dimfeld dimfeld closed this as completed Jun 5, 2014
@tv42
Copy link
Author

tv42 commented Jun 5, 2014

Ah, that actually makes sense. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants