mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Fix for 'terminate' in request, send empty body instead of error (thanks to Stefan Strigler)
SVN Revision: 2215
This commit is contained in:
parent
9b8d897b5f
commit
fbf4a7aa35
@ -3,12 +3,12 @@
|
||||
%%% Author : Stefan Strigler <steve@zeank.in-berlin.de>
|
||||
%%% Purpose : HTTP Binding support (JEP-0124)
|
||||
%%% Created : 21 Sep 2005 by Stefan Strigler <steve@zeank.in-berlin.de>
|
||||
%%% Id : $Id: ejabberd_http_bind.erl 241 2007-08-03 12:13:13Z sstrigler $
|
||||
%%% Id : $Id: ejabberd_http_bind.erl 243 2007-08-03 13:48:49Z sstrigler $
|
||||
%%%----------------------------------------------------------------------
|
||||
|
||||
-module(ejabberd_http_bind).
|
||||
-author('steve@zeank.in-berlin.de').
|
||||
-vsn('$Rev: 241 $').
|
||||
-vsn('$Rev: 243 $').
|
||||
|
||||
-behaviour(gen_fsm).
|
||||
|
||||
@ -226,8 +226,13 @@ receive_loop(Sid, Rid, Wait, Hold, Attrs, StreamStart) ->
|
||||
prepare_response(Sid, Rid, Wait, Hold, Attrs, StreamStart) ->
|
||||
case http_get(Sid, Rid) of
|
||||
{error, not_exists} ->
|
||||
case xml:get_attr_s("type", Attrs) of
|
||||
"terminate" ->
|
||||
{200, ?HEADER, "<body xmlns='http://jabber.org/protocol/httpbind'/>"};
|
||||
_ ->
|
||||
?DEBUG("no session associated with sid: ~s", [Sid]),
|
||||
{404, ?HEADER, ""};
|
||||
{404, ?HEADER, ""}
|
||||
end;
|
||||
{ok, keep_on_hold} ->
|
||||
receive_loop(Sid, Rid, Wait, Hold, Attrs, StreamStart);
|
||||
{ok, cancel} ->
|
||||
|
Loading…
Reference in New Issue
Block a user