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

Bug - parameter separator logic bug when path end with variable params #369

Open
aofong19871029 opened this issue May 11, 2024 · 1 comment

Comments

@aofong19871029
Copy link

There are two urls
/h5/:cityName-:poiName/hotels-c:cityId-r:poiId
/h5/:cityName-:poiName/hotels-c:cityId-a:poiId

The different part are the first letter of "r:poiId" and "a:poiId"
Under normal circumstances, the two URLs above should not be recognized as two different URLs.

However find-my-way identify two urls have same pattern /h5/()/hotels-c() and then throw `Method 'get' already declared for route '/h5/()/hotels-c().' with constraints '{}'

After studied and debugged the source code and thought the problem should be in L246
In line246 if the route is end with variable, find-my-way omissions the static part between two variable.

@aofong19871029 aofong19871029 changed the title Bug - parameter separator logic when path end of variable params Bug - parameter separator logic bug when path end with variable params May 11, 2024
@mcollina
Copy link
Collaborator

Thanks for reporting!

Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that.

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