Add new debuging hook to the http receiving process.

The new hook is called http_request_debug, and receive the  LocalPath and Request as parameter.

SVN Revision: 2961
This commit is contained in:
Pablo Polvorin 2010-02-04 19:07:25 +00:00 committed by Badlop
parent 787e078f6a
commit bc70e90853
1 changed files with 3 additions and 1 deletions

View File

@ -325,7 +325,9 @@ process(Handlers, Request) ->
%% requested path is "/test/foo/bar", the local path is
%% ["foo", "bar"]
LocalPath = lists:nthtail(length(HandlerPathPrefix), Request#request.path),
HandlerModule:process(LocalPath, Request);
R = HandlerModule:process(LocalPath, Request),
ejabberd_hooks:run(http_request_debug, [{LocalPath, Request}]),
R;
false ->
process(HandlersLeft, Request)
end.