25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

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

SVN Revision: 2191
This commit is contained in:
Badlop 2009-06-16 13:52:52 +00:00
parent 14afea1a20
commit fa83147926

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