hivesolutions/appier

Bug: Appier routes don't support resource names with special characters

Closed this issue · 2 comments

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.

@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.

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