]> granicus.if.org Git - ejabberd/commitdiff
Add new debuging hook to the http receiving process.
authorPablo Polvorin <pablo.polvorin@process-one.net>
Thu, 4 Feb 2010 19:07:25 +0000 (19:07 +0000)
committerBadlop <badlop@process-one.net>
Fri, 5 Feb 2010 12:30:27 +0000 (13:30 +0100)
The new hook is called http_request_debug, and receive the  LocalPath and Request as parameter.

SVN Revision: 2961

src/web/ejabberd_http.erl

index 57d0d0522dd726bf84fc0a4984650f7dbc85bec2..47b206395c50ac0405aec223f5c2e8b32305308f 100644 (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.