summaryrefslogtreecommitdiff
path: root/src/web/ejabberd_http_poll.erl
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2010-08-19 17:37:21 +0200
committerBadlop <badlop@process-one.net>2010-08-19 17:38:38 +0200
commitd87fff1a4c500d9abe3945cbfea792b4eddfa3f2 (patch)
tree66c45e8ebe36d24f3779d07398fa7dbfc70e0493 /src/web/ejabberd_http_poll.erl
parentfixes ampersand escaping (EJAB-1258) (diff)
Bugfix http-poll for correctly parsing binary (thanks to Peter Lemenkov)
Diffstat (limited to '')
-rw-r--r--src/web/ejabberd_http_poll.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/web/ejabberd_http_poll.erl b/src/web/ejabberd_http_poll.erl
index 0bdbc628..faa0f3c1 100644
--- a/src/web/ejabberd_http_poll.erl
+++ b/src/web/ejabberd_http_poll.erl
@@ -272,7 +272,13 @@ handle_event(_Event, StateName, StateData) ->
%% {stop, Reason, Reply, NewStateData}
%%----------------------------------------------------------------------
handle_sync_event({send, Packet}, _From, StateName, StateData) ->
- Output = StateData#state.output ++ [lists:flatten(Packet)],
+ Packet2 = if
+ is_binary(Packet) ->
+ binary_to_list(Packet);
+ true ->
+ Packet
+ end,
+ Output = StateData#state.output ++ [lists:flatten(Packet2)],
Reply = ok,
{reply, Reply, StateName, StateData#state{output = Output}};