diff --git a/src/misc.erl b/src/misc.erl index 0733ef298..7380011c2 100644 --- a/src/misc.erl +++ b/src/misc.erl @@ -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. diff --git a/src/mod_sip.erl b/src/mod_sip.erl index 6a710a6e8..cc2857181 100644 --- a/src/mod_sip.erl +++ b/src/mod_sip.erl @@ -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]).