]> granicus.if.org Git - ejabberd/commitdiff
Allow a request_handler to serve a file in root of HTTP
authorBadlop <badlop@process-one.net>
Wed, 10 Feb 2010 17:42:42 +0000 (18:42 +0100)
committerBadlop <badlop@process-one.net>
Wed, 10 Feb 2010 19:17:09 +0000 (20:17 +0100)
src/web/ejabberd_http.erl

index 47b206395c50ac0405aec223f5c2e8b32305308f..821fffb912fbff5b3e996b1fd71bc6ba69f50013 100644 (file)
@@ -317,7 +317,8 @@ process([], _) ->
 process(Handlers, Request) ->
     [{HandlerPathPrefix, HandlerModule} | HandlersLeft] = Handlers,
 
-    case lists:prefix(HandlerPathPrefix, Request#request.path) of
+    case (lists:prefix(HandlerPathPrefix, Request#request.path) or
+         (HandlerPathPrefix==Request#request.path)) of
        true ->
             ?DEBUG("~p matches ~p", [Request#request.path, HandlerPathPrefix]),
             %% LocalPath is the path "local to the handler", i.e. if