mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Fix type of rest:url/2
This commit is contained in:
parent
a567abcfdf
commit
42c029d5f7
@ -174,13 +174,13 @@ base_url(Server, Path) ->
|
||||
end.
|
||||
|
||||
url(Url, []) ->
|
||||
Url;
|
||||
binary_to_list(Url);
|
||||
url(Url, Params) ->
|
||||
L = [<<"&", (iolist_to_binary(Key))/binary, "=",
|
||||
(misc:url_encode(Value))/binary>>
|
||||
|| {Key, Value} <- Params],
|
||||
<<$&, Encoded/binary>> = iolist_to_binary(L),
|
||||
<<Url/binary, $?, Encoded/binary>>.
|
||||
binary_to_list(<<Url/binary, $?, Encoded/binary>>).
|
||||
url(Server, Path, Params) ->
|
||||
case binary:split(base_url(Server, Path), <<"?">>) of
|
||||
[Url] ->
|
||||
|
Loading…
Reference in New Issue
Block a user