25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

* src/web/ejabberd_http.erl: Add 'http_bind' option for easy

configuration of HTTP-Binding

SVN Revision: 1101
This commit is contained in:
Badlop 2007-12-22 14:23:37 +00:00
parent ccbc4b0c04
commit 27063837ae
2 changed files with 13 additions and 5 deletions

View File

@ -1,5 +1,8 @@
2007-12-22 Badlop <badlop@process-one.net> 2007-12-22 Badlop <badlop@process-one.net>
* src/web/ejabberd_http.erl: Add 'http_bind' option for easy
configuration of HTTP-Binding
* src/mod_announce.erl: Fixed unnoticeable bug related to Node * src/mod_announce.erl: Fixed unnoticeable bug related to Node
matching. Renamed some nonstandard node names according to matching. Renamed some nonstandard node names according to
XEP-0133. Small reordering of clauses. When editing MOTD, display XEP-0133. Small reordering of clauses. When editing MOTD, display

View File

@ -78,19 +78,24 @@ start_link({SockMod, Socket}, Opts) ->
ok ok
end, end,
%% XXX bard: for backward compatibility: expand web_admin and %% XXX bard: for backward compatibility, expand in Opts:
%% http_poll in Opts respectively to {["admin"], %% web_admin -> {["admin"], ejabberd_web_admin}
%% ejabberd_web_admin} and {["http-poll"], ejabberd_http_poll} %% http_bind -> {["http-bind"], mod_http_bind}
%% http_poll -> {["http-poll"], ejabberd_http_poll}
RequestHandlers = RequestHandlers =
case lists:keysearch(request_handlers, 1, Opts) of case lists:keysearch(request_handlers, 1, Opts) of
{value, {request_handlers, H}} -> H; {value, {request_handlers, H}} -> H;
false -> [] false -> []
end ++ end ++
case lists:member(web_admin, Opts) of case lists:member(web_admin, Opts) of
true -> [{["admin"], ejabberd_web_admin}]; true -> [{["admin"], ejabberd_web_admin}];
false -> [] false -> []
end ++ end ++
case lists:member(http_bind, Opts) of
true -> [{["http-bind"], mod_http_bind}];
false -> []
end ++
case lists:member(http_poll, Opts) of case lists:member(http_poll, Opts) of
true -> [{["http-poll"], ejabberd_http_poll}]; true -> [{["http-poll"], ejabberd_http_poll}];
false -> [] false -> []