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: Appier routes don't support resource names with special characters #48

Closed
joao-conde opened this issue Jul 14, 2021 · 2 comments
Closed

Comments

@joao-conde
Copy link
Contributor

joao-conde commented Jul 14, 2021

Description

Appier routes like this:

@appier.route("/api/orders/<int:number>/attachments/<str:attachment_name>", "GET", json = True)

work as expected and match with an URL such as:

https://URL/api/9999/attachments/docname.pdf

However, they do not match the following two:

https://URL/api/9999/attachments/doc%20name.pdf
https://URL/api/9999/attachments/docname(1).pdf

It seems spaces and parenthesis are not supported. The resources are encoded by the likes of a method like JavaScripts' encodeURIComponent and are valid URL syntax, so they should be supported.

@joao-conde
Copy link
Contributor Author

@joamag Evaluate the format of the open issue please, I can include more information if need be. Also, I can't add the proper labels or assignees.

@joamag
Copy link
Contributor

joamag commented Jul 14, 2021

that's expected for that you need to use the regex() version instead of the str one which only supports basic Latin characters

@joamag joamag closed this as completed Jul 14, 2021
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