diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-11-18 13:39:10 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-11-18 13:39:10 +0300 |
commit | f57f267c542a8e6ddbb31cb3ba05c4fd3798f998 (patch) | |
tree | 4322c5f5b94f4d4f657aaa2199fc963cfc485bc8 /src/mod_http_api.erl | |
parent | Make common tests working again (diff) | |
parent | Add auth to mod_http_fileserver (diff) |
Merge branch 'master' of github.com:processone/ejabberd
Conflicts:
test/ejabberd_SUITE.erl
Diffstat (limited to 'src/mod_http_api.erl')
-rw-r--r-- | src/mod_http_api.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mod_http_api.erl b/src/mod_http_api.erl index 881587ede..a189777b1 100644 --- a/src/mod_http_api.erl +++ b/src/mod_http_api.erl @@ -273,7 +273,7 @@ handle(Call, Auth, Args, Version) when is_atom(Call), is_list(Args) -> fun ({Key, binary}, Acc) -> [{Key, <<>>}|Acc]; ({Key, string}, Acc) -> - [{Key, <<>>}|Acc]; + [{Key, ""}|Acc]; ({Key, integer}, Acc) -> [{Key, 0}|Acc]; ({Key, {list, _}}, Acc) -> @@ -406,10 +406,10 @@ format_arg(Elements, {list, ElementsDef}) format_arg(Arg, integer) when is_integer(Arg) -> Arg; format_arg(Arg, binary) when is_list(Arg) -> process_unicode_codepoints(Arg); format_arg(Arg, binary) when is_binary(Arg) -> Arg; -format_arg(Arg, string) when is_list(Arg) -> process_unicode_codepoints(Arg); -format_arg(Arg, string) when is_binary(Arg) -> Arg; +format_arg(Arg, string) when is_list(Arg) -> Arg; +format_arg(Arg, string) when is_binary(Arg) -> binary_to_list(Arg); format_arg(undefined, binary) -> <<>>; -format_arg(undefined, string) -> <<>>; +format_arg(undefined, string) -> ""; format_arg(Arg, Format) -> ?ERROR_MSG("don't know how to format Arg ~p for format ~p", [Arg, Format]), throw({invalid_parameter, |