mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 17:59:31 +02:00
Fix type of rest:url/2
This commit is contained in:
parent
a567abcfdf
commit
42c029d5f7
1 changed files with 2 additions and 2 deletions
|
@ -174,13 +174,13 @@ base_url(Server, Path) ->
|
||||||
end.
|
end.
|
||||||
|
|
||||||
url(Url, []) ->
|
url(Url, []) ->
|
||||||
Url;
|
binary_to_list(Url);
|
||||||
url(Url, Params) ->
|
url(Url, Params) ->
|
||||||
L = [<<"&", (iolist_to_binary(Key))/binary, "=",
|
L = [<<"&", (iolist_to_binary(Key))/binary, "=",
|
||||||
(misc:url_encode(Value))/binary>>
|
(misc:url_encode(Value))/binary>>
|
||||||
|| {Key, Value} <- Params],
|
|| {Key, Value} <- Params],
|
||||||
<<$&, Encoded/binary>> = iolist_to_binary(L),
|
<<$&, Encoded/binary>> = iolist_to_binary(L),
|
||||||
<<Url/binary, $?, Encoded/binary>>.
|
binary_to_list(<<Url/binary, $?, Encoded/binary>>).
|
||||||
url(Server, Path, Params) ->
|
url(Server, Path, Params) ->
|
||||||
case binary:split(base_url(Server, Path), <<"?">>) of
|
case binary:split(base_url(Server, Path), <<"?">>) of
|
||||||
[Url] ->
|
[Url] ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue