mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Use httpd_util:to_lower when not compiling with Erlang R12 (EJAB-628)
SVN Revision: 2191
This commit is contained in:
parent
14afea1a20
commit
fa83147926
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user