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

Setting to do automatic unescaping on request params and query params #59

Closed
seghcder opened this issue Oct 16, 2019 · 5 comments
Closed

Comments

@seghcder
Copy link

Suggested feature.

Ie to avoid having to do this for each parameter:

auto thing_param = restinio::utils::unescape_percent_encoding(params["thing"]);
@eao197
Copy link
Member

eao197 commented Oct 16, 2019

Thanks for reporting this.

Unfortunately, it's hard to predict when we can address it.

@seghcder
Copy link
Author

No problems - understood.

@eao197
Copy link
Member

eao197 commented Dec 5, 2019

Hi, @seghcder!
I'm trying to address this issue and want to ask for more information about it. Can you describe some use cases where you have to call unescape_percent_encoding manually?

@seghcder
Copy link
Author

I just checked two instances where I had issues in the past (param and query) and it seems to be working correctly now. One issue I had was using quote marks in query string like this -

http://api.example.com/api/item/%2221%22/function

I was thinking to have two paths depending if it was a string name or a numeric ID, but needing to handle the edge case where a name is numeric.

At the time it wasn't decoding to "21". But its an edge case, it seems to be working now, and I think there may also have been some issues with the way Postman and/or nginx was processing the url too. I solved it another way in the end but might come back to this topic.

If it comes up again will let you know. Feel free to close.

@eao197
Copy link
Member

eao197 commented Jan 14, 2020

If it comes up again will let you know. Feel free to close.

Ok.

@eao197 eao197 closed this as completed Jan 14, 2020
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