Have consistent schema type in misc:uri_parse
This commit is contained in:
parent
bc9e5c5363
commit
3d4f2d365f
|
@ -63,7 +63,7 @@ uri_parse(URL) when is_binary(URL) ->
|
||||||
uri_parse(URL) ->
|
uri_parse(URL) ->
|
||||||
case http_uri:parse(URL) of
|
case http_uri:parse(URL) of
|
||||||
{ok, {Scheme, _UserInfo, Host, Port, Path, Query}} ->
|
{ok, {Scheme, _UserInfo, Host, Port, Path, Query}} ->
|
||||||
{ok, Scheme, Host, Port, Path, Query};
|
{ok, atom_to_list(Scheme), Host, Port, Path, Query};
|
||||||
{error, _} = E ->
|
{error, _} = E ->
|
||||||
E
|
E
|
||||||
end.
|
end.
|
||||||
|
|
|
@ -359,7 +359,7 @@ mod_opt_type(via) ->
|
||||||
fun(URI) ->
|
fun(URI) ->
|
||||||
{ok, Type, Host, Port, _, _} =
|
{ok, Type, Host, Port, _, _} =
|
||||||
misc:uri_parse(URI),
|
misc:uri_parse(URI),
|
||||||
{Type, {unicode:characters_to_binary(Host), Port}}
|
{list_to_atom(Type), {unicode:characters_to_binary(Host), Port}}
|
||||||
end))(U)
|
end))(U)
|
||||||
end, [unique]).
|
end, [unique]).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue