From 0d09816c39f7e4d75f5db6f1a29ff92d5e27b6d9 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 10 Feb 2010 18:42:42 +0100 Subject: [PATCH] Allow a request_handler to serve a file in root of HTTP --- src/web/ejabberd_http.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/web/ejabberd_http.erl b/src/web/ejabberd_http.erl index 3f94839c6..6d5339498 100644 --- a/src/web/ejabberd_http.erl +++ b/src/web/ejabberd_http.erl @@ -321,7 +321,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