-
Notifications
You must be signed in to change notification settings - Fork 709
Ambigious routing after update to stable version #148
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
Comments
I got the same issue, but change the order is not work for me. It seems related to request sequence. If request |
Thanks for the repro and behavior description. I found the issue immediately. In short, it's due to an optimization in the action selector. Since ASP.NET Core might call the action selector multiple times, all the results have to be tallied and then a final decision is made at the end once all possible candidates have been considered. This could negatively hurt performance if this was the case for every, single request. An optimization exists that tracks whether an action has been matched all the way through the pipeline at least once. Once it has, the action selector can short-circuit and return the match without considering other candidates. What's missing is a check to determine whether there are high precedence candidates when this happens. In this scenario:
This should be a relatively simple fix. I'll get it out ASAP. I suspect that this is also the cause for #147. |
Thanks for this qiuck fix! |
I've created a simple project to repro this bug: https://github.com/xakep139/simpleAspNetCoreApplication
If you request
/api/1.0/values/123/abcdef
and then/api/1.0/values/123/versions
it goes intoGetVersion()
action in both request.But if change order of requests it works as expected -
GetVersions()
and thenGetVersion()
The text was updated successfully, but these errors were encountered: