mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Use httpd_util:to_lower when not compiling with Erlang R12 (EJAB-628)
SVN Revision: 2176
This commit is contained in:
parent
c4ca19d313
commit
d2684bc3e8
@ -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