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

uri in the @http trait accepts UTF-8 #975

Closed
david-perez opened this issue Nov 10, 2021 · 2 comments · Fixed by #1154
Closed

uri in the @http trait accepts UTF-8 #975

david-perez opened this issue Nov 10, 2021 · 2 comments · Fixed by #1154
Labels
documentation This is a problem with documentation.

Comments

@david-perez
Copy link
Contributor

https://awslabs.github.io/smithy/1.0/spec/core/http-traits.html#uri

As of writing, Smithy accepts e.g. @http(method: "PUT", uri: "/service/小路/💙/طريق"). It probably should just accept ASCII, as per this URL spec .

Everything seems to be just ASCII, so the endpoint trait, which defines host prefixes, is probably affected as well.

@mtdowling
Copy link
Member

RFC 7230 refers to RFC 3986 for the allowed characters of a request's request-target, and you're right that it doesn't accept arbitrary UTF-8: https://datatracker.ietf.org/doc/html/rfc3986#section-3.3. We should update the spec to make this clear and add validation.

@mtdowling mtdowling added the documentation This is a problem with documentation. label Nov 19, 2021
mtdowling added a commit that referenced this issue Mar 24, 2022
mtdowling added a commit that referenced this issue Mar 24, 2022
@david-perez
Copy link
Contributor Author

What about the endpoint trait?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants