Have consistent schema type in misc:uri_parse

This commit is contained in:
Paweł Chmielowski 2022-05-06 10:06:13 +02:00
parent bc9e5c5363
commit 3d4f2d365f
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ uri_parse(URL) when is_binary(URL) ->
uri_parse(URL) ->
case http_uri:parse(URL) of
{ok, {Scheme, _UserInfo, Host, Port, Path, Query}} ->
{ok, Scheme, Host, Port, Path, Query};
{ok, atom_to_list(Scheme), Host, Port, Path, Query};
{error, _} = E ->
E
end.

View File

@ -359,7 +359,7 @@ mod_opt_type(via) ->
fun(URI) ->
{ok, Type, Host, Port, _, _} =
misc:uri_parse(URI),
{Type, {unicode:characters_to_binary(Host), Port}}
{list_to_atom(Type), {unicode:characters_to_binary(Host), Port}}
end))(U)
end, [unique]).