From d2684bc3e83c0f197bdf6983fbb24928e3abfb67 Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 16 Jun 2009 13:45:17 +0000 Subject: [PATCH] Use httpd_util:to_lower when not compiling with Erlang R12 (EJAB-628) SVN Revision: 2176 --- src/web/mod_http_fileserver.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/web/mod_http_fileserver.erl b/src/web/mod_http_fileserver.erl index d3c796257..96fa27e0c 100644 --- a/src/web/mod_http_fileserver.erl +++ b/src/web/mod_http_fileserver.erl @@ -25,6 +25,12 @@ -include("ejabberd_ctl.hrl"). -include_lib("kernel/include/file.hrl"). +-ifdef(SSL39). +-define(STRING2LOWER, string). +-else. +-define(STRING2LOWER, httpd_util). +-endif. + %%%---------------------------------------------------------------------- %%% REQUEST HANDLERS %%%---------------------------------------------------------------------- @@ -118,7 +124,7 @@ log(File, Code, Request) -> [IP, Day, Month, Year, Hour, Minute, Second, Request#request.method, Path, Query, Code]). content_type(Filename) -> - case string:to_lower(filename:extension(Filename)) of + case ?STRING2LOWER:to_lower(filename:extension(Filename)) of ".jpg" -> "image/jpeg"; ".jpeg" -> "image/jpeg"; ".gif" -> "image/gif";