diff options
author | Pablo Polvorin <pablo.polvorin@process-one.net> | 2010-02-04 19:07:25 +0000 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2010-02-05 13:30:27 +0100 |
commit | bc70e90853ca702d7fa0db761641da43478b0c56 (patch) | |
tree | c853799c49928e0bcb3a89c5a6de23b4609a0338 /src | |
parent | Hibernate http-bind process after handling a request. (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/web/ejabberd_http.erl | 4 |
1 files changed, 3 insertions, 1 deletions
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. |