summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Chmielowski <pawel@process-one.net>2022-05-06 10:06:13 +0200
committerPaweł Chmielowski <pawel@process-one.net>2022-05-06 10:06:13 +0200
commit3d4f2d365fb4ab1f6cd3b0707735eaa81efdf8ce (patch)
tree03c28bf9812142470ec78e1f927b690f57df4f60
parentFix one more place where misc:uri_parse is used (diff)
Have consistent schema type in misc:uri_parse
-rw-r--r--src/misc.erl2
-rw-r--r--src/mod_sip.erl2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/misc.erl b/src/misc.erl
index 0733ef29..7380011c 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 6a710a6e..cc285718 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]).