From: Christophe Romain Date: Thu, 19 Apr 2018 11:21:33 +0000 (+0200) Subject: Fix type of rest:url/2 X-Git-Tag: 18.04~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=42c029d5f7be60ee69bcb72d70f2bc7c87879dc0;p=ejabberd Fix type of rest:url/2 --- diff --git a/src/rest.erl b/src/rest.erl index df6ed7f01..18bf1b5ee 100644 --- a/src/rest.erl +++ b/src/rest.erl @@ -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), - <>. + binary_to_list(<>). url(Server, Path, Params) -> case binary:split(base_url(Server, Path), <<"?">>) of [Url] ->