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

Do more to deal with Resource/Routes paths eating each other #240

Closed
Ghnuberath opened this issue Apr 30, 2018 · 1 comment · Fixed by #280
Closed

Do more to deal with Resource/Routes paths eating each other #240

Ghnuberath opened this issue Apr 30, 2018 · 1 comment · Fixed by #280

Comments

@Ghnuberath
Copy link
Member

Ghnuberath commented Apr 30, 2018

For example, registering a Resource with super('/') and another with super('/test') could result in the former's get (ctx) preventing the latter's getAll (ctx) from functioning.
Requiring Routes and Resources in descending order of number of path components might address this.

@Ghnuberath Ghnuberath added this to the Release 1.0.0 milestone Apr 30, 2018
@Ghnuberath Ghnuberath self-assigned this May 15, 2018
@Ghnuberath Ghnuberath changed the title Do more to check when Resource/Routes paths eat each other Do more to deal with Resource/Routes paths eating each other Jun 13, 2018
@Ghnuberath
Copy link
Member Author

Courtesy of @ggayowsky, this bug is also related, and a complete pain when two routes match the same request. The current behaviour is that both routes are run, and a 500 is produced due to internal Ravel assumptions that certain middleware (in particuar, Rest.respond only runs once per request).

Unfortunately, there's been no real activity on this issue for a long time, either in koa-router or its official fork @koa/router.

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

Successfully merging a pull request may close this issue.

1 participant