You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like hackney is just splitting on @ and winds up trying to treat part of the credentials as the port when a url containing @ in the credentials is parsed.
While this is admittedly a weird thing to do it is technically valid and parses correctly in other libraries. Elixir's URI module for example is able to parse it:
For now I'm able to work around by parsing with URI and using the result to create the hackney_url record myself and passing that to hackney:request/5 but it would be great if hackney_url:parse_url/1 could be updated to follow the RFC.
It looks like hackney is just splitting on
@
and winds up trying to treat part of the credentials as the port when a url containing@
in the credentials is parsed.While this is admittedly a weird thing to do it is technically valid and parses correctly in other libraries. Elixir's URI module for example is able to parse it:
For now I'm able to work around by parsing with URI and using the result to create the hackney_url record myself and passing that to hackney:request/5 but it would be great if hackney_url:parse_url/1 could be updated to follow the RFC.
The Elixir implementation for URI.parse/1 is here if that is useful: https://github.com/elixir-lang/elixir/blob/v1.10.0/lib/elixir/lib/uri.ex#L455
Thanks!
Adam
The text was updated successfully, but these errors were encountered: