25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

Use httpd_util:to_lower when not compiling with Erlang R12 (EJAB-628)

SVN Revision: 2176
This commit is contained in:
Badlop 2009-06-16 13:45:17 +00:00
parent c4ca19d313
commit d2684bc3e8

View File

@ -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";