From 00807235c4b42f760b4d26f9720396638c8bb60b Mon Sep 17 00:00:00 2001 From: Alexey Shchepin Date: Thu, 25 Jan 2007 05:53:58 +0000 Subject: * src/web/*: Plugin architecture for HTTP modules (thanks to Massimiliano Mirra) SVN Revision: 713 --- src/web/ejabberd_http_poll.erl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/web/ejabberd_http_poll.erl') diff --git a/src/web/ejabberd_http_poll.erl b/src/web/ejabberd_http_poll.erl index d12277449..01268b817 100644 --- a/src/web/ejabberd_http_poll.erl +++ b/src/web/ejabberd_http_poll.erl @@ -24,7 +24,7 @@ setopts/2, controlling_process/2, close/1, - process_request/1]). + process/2]). -include("ejabberd.hrl"). -include("jlib.hrl"). @@ -83,8 +83,7 @@ close({http_poll, FsmRef}) -> catch gen_fsm:sync_send_all_state_event(FsmRef, close). -process_request(#request{path = [], - data = Data} = Request) -> +process([], #request{data = Data} = Request) -> case catch parse_request(Data) of {ok, ID1, Key, NewKey, Packet} -> ID = if @@ -130,7 +129,7 @@ process_request(#request{path = [], _ -> {200, [?CT, {"Set-Cookie", "ID=-2:0; expires=-1"}], ""} end; -process_request(_Request) -> +process(_, _Request) -> {400, [], {xmlelement, "h1", [], [{xmlcdata, "400 Bad Request"}]}}. -- cgit v1.2.3