mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Reverted to r76 as 97 is completely broken and should not have been checked in at all (thanks to Stefan Strigler)
SVN Revision: 2207
This commit is contained in:
parent
2e402c27f4
commit
70fd795a1b
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,7 @@
|
|||||||
%%% Author : Stefan Strigler <steve@zeank.in-berlin.de>
|
%%% Author : Stefan Strigler <steve@zeank.in-berlin.de>
|
||||||
%%% Purpose : Implementation of XMPP over BOSH (XEP-0206)
|
%%% Purpose : Implementation of XMPP over BOSH (XEP-0206)
|
||||||
%%% Created : Tue Feb 20 13:15:52 CET 2007
|
%%% Created : Tue Feb 20 13:15:52 CET 2007
|
||||||
|
%%% Id : $Id: $
|
||||||
%%%----------------------------------------------------------------------
|
%%%----------------------------------------------------------------------
|
||||||
|
|
||||||
%%%----------------------------------------------------------------------
|
%%%----------------------------------------------------------------------
|
||||||
@ -14,7 +15,7 @@
|
|||||||
-module(mod_http_bind).
|
-module(mod_http_bind).
|
||||||
-author('steve@zeank.in-berlin.de').
|
-author('steve@zeank.in-berlin.de').
|
||||||
|
|
||||||
-define(MOD_HTTP_BIND_VERSION, '1.0').
|
-define(MOD_HTTP_BIND_VERSION, "1.0").
|
||||||
-vsn(?MOD_HTTP_BIND_VERSION).
|
-vsn(?MOD_HTTP_BIND_VERSION).
|
||||||
|
|
||||||
%%-define(ejabberd_debug, true).
|
%%-define(ejabberd_debug, true).
|
||||||
@ -47,7 +48,7 @@ process([], #request{method = 'POST',
|
|||||||
ejabberd_http_bind:process_request(Data);
|
ejabberd_http_bind:process_request(Data);
|
||||||
process([], #request{method = 'GET',
|
process([], #request{method = 'GET',
|
||||||
data = []}) ->
|
data = []}) ->
|
||||||
Heading = "Ejabberd " ++ atom_to_list(?MODULE) ++ " v" ++ lists:concat([?MOD_HTTP_BIND_VERSION]),
|
Heading = "Ejabberd " ++ atom_to_list(?MODULE) ++ " v" ++ ?MOD_HTTP_BIND_VERSION,
|
||||||
{xmlelement, "html", [{"xmlns", "http://www.w3.org/1999/xhtml"}],
|
{xmlelement, "html", [{"xmlns", "http://www.w3.org/1999/xhtml"}],
|
||||||
[{xmlelement, "head", [],
|
[{xmlelement, "head", [],
|
||||||
[{xmlelement, "title", [], [{xmlcdata, Heading}]}]},
|
[{xmlelement, "title", [], [{xmlcdata, Heading}]}]},
|
||||||
@ -56,16 +57,21 @@ process([], #request{method = 'GET',
|
|||||||
{xmlelement, "p", [],
|
{xmlelement, "p", [],
|
||||||
[{xmlcdata, "An implementation of "},
|
[{xmlcdata, "An implementation of "},
|
||||||
{xmlelement, "a", [{"href", "http://www.xmpp.org/extensions/xep-0206.html"}],
|
{xmlelement, "a", [{"href", "http://www.xmpp.org/extensions/xep-0206.html"}],
|
||||||
[{xmlcdata, "XMPP over BOSH (XEP-0206)"}]},
|
[{xmlcdata, "XMPP over BOSH (XEP-0206)"}]}]},
|
||||||
{xmlcdata, "."}]},
|
|
||||||
{xmlelement, "p", [],
|
{xmlelement, "p", [],
|
||||||
[{xmlcdata, integer_to_list(mnesia:table_info(http_bind, size)) ++ " sessions found."}]}
|
[{xmlcdata, integer_to_list(mnesia:table_info(http_bind, size)) ++ " sessions found."}]},
|
||||||
]}]};
|
{xmlelement, "p", [],
|
||||||
|
[{xmlcdata, "Sponsored by "},
|
||||||
|
{xmlelement, "a", [{"href", "http://mabber.com"}],
|
||||||
|
[{xmlcdata, "mabber"}]},
|
||||||
|
{xmlcdata, "."}]}
|
||||||
|
]}]};
|
||||||
process(_Path, _Request) ->
|
process(_Path, _Request) ->
|
||||||
?DEBUG("Bad Request: ~p", [_Request]),
|
?DEBUG("Bad Request: ~p", [_Request]),
|
||||||
{400, [], {xmlelement, "h1", [],
|
{400, [], {xmlelement, "h1", [],
|
||||||
[{xmlcdata, "400 Bad Request"}]}}.
|
[{xmlcdata, "400 Bad Request"}]}}.
|
||||||
|
|
||||||
|
|
||||||
%%%----------------------------------------------------------------------
|
%%%----------------------------------------------------------------------
|
||||||
%%% BEHAVIOUR CALLBACKS
|
%%% BEHAVIOUR CALLBACKS
|
||||||
%%%----------------------------------------------------------------------
|
%%%----------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user