From b22e8b706ad95432ab6d980b7f8162ee54c10aa0 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 875e0fc13..3f94839c6 100644 --- a/src/web/ejabberd_http.erl +++ b/src/web/ejabberd_http.erl @@ -329,7 +329,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.