From bc70e90853ca702d7fa0db761641da43478b0c56 Mon Sep 17 00:00:00 2001 From: Pablo Polvorin Date: Thu, 4 Feb 2010 19:07:25 +0000 Subject: [PATCH] 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 --- src/web/ejabberd_http.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/web/ejabberd_http.erl b/src/web/ejabberd_http.erl index 57d0d0522..47b206395 100644 --- a/src/web/ejabberd_http.erl +++ b/src/web/ejabberd_http.erl @@ -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.