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

handle path params with prefixes and suffixes #414

Merged
merged 3 commits into from Oct 19, 2019
Merged

handle path params with prefixes and suffixes #414

merged 3 commits into from Oct 19, 2019

Conversation

jaswdr
Copy link
Contributor

@jaswdr jaswdr commented Oct 10, 2019

In current implementation if you have a path parameter with some prefix or suffix the path processor doesn't extract the values correctly, see some examples:

/foo_{var}
/{var}_foo
/foo_{var}_bar

This patch handle those cases using regexp to correctly extract values.

@emicklei
Copy link
Owner

i am worried about the performance impact of this change. Creating and executing regexp can be expensive.

@jaswdr
Copy link
Contributor Author

jaswdr commented Oct 11, 2019

@emicklei ack, I used now strings indexes like the previous code, please let me now if this feel better

@jaswdr
Copy link
Contributor Author

jaswdr commented Oct 18, 2019

ping @emicklei

@emicklei
Copy link
Owner

thank you for contributing

@emicklei emicklei merged commit c52a783 into emicklei:master Oct 19, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants