-
Notifications
You must be signed in to change notification settings - Fork 596
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
Impossible to parse cyrillic Uri #86
Comments
If you read the docs of
So this means you will need to transform the unicode hostname into ascii before passing it to apply or construct your |
We should discuss if we can improve this when @ktoso is back. |
Thanks, understood. While it works, it is a workaround of sorts, because if I use the |
RFC 3986 is very strict on what is allowed within a URI, so I would conclude that the attribute values extracted by JSoup need to be sanitized before they can be used in this context. Adding that code to |
I agree, my thoughts was that there will be people who will want to parse URI:s that contain IDN host parts, and maybe we should/could provide a separate way to do that easily. |
@johanandren my thoughts exactly. And it's not only about the hosts, there are non-ASCII characters in other URI components, like paths, in the wild. |
Yes, true. What makes me wonder (in general) is why this punycode thing was even invented, given percent encoding. |
Because it is for DNS, and % was a no-go for backwards compatibility (if I On Wed, Feb 3, 2016 at 12:36 PM, Roland Kuhn [email protected]
|
Actual spec for URLs is: https://url.spec.whatwg.org/ |
I also ran into the same issue. I've made an attempt in the If this is considered relevant, I can try to contribute it into the akka-http project. |
@RustedBones, thanks for sharing. I wonder how you would use that model in the context of akka-http? The HTTP spec is also pretty strict about how URIs used in the protocol have to look like. How are IRIs used in the HTTP protocol? |
On the HTTP layer, we don't have to use
At the moment this conversion must be done by users. For better usability, It would be nice that the |
I see. Indeed that would be nice. Could one solution be to "just" offer a new constructor for |
Coming here in 2020, I'm wondering if there is any way using pure Akka to sort this out now, or if we still need another library with IRI support? |
Tuesday Feb 02, 2016 at 19:17 GMT
Originally opened as akka/akka#19677
Consider this:
"com.typesafe.akka" %% "akka-http-experimental" % "2.4.2-RC1"
Any insights on how to tackle this?
The text was updated successfully, but these errors were encountered: