diff options
author | David.Gao <[email protected]> | 2019-01-21 23:26:31 +0800 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-03-25 16:26:08 +0100 |
commit | 853efc34baeea50a814bdc57f2e40cb6cd28ec2a (patch) | |
tree | 196caa8b326d4b4599fc5d96e1110ab890cc96d0 /src | |
parent | 41f3bdc9a9ee88c32ea576bd6a99ee122b4ad4a2 (diff) | |
download | cowlib-853efc34baeea50a814bdc57f2e40cb6cd28ec2a.tar.gz cowlib-853efc34baeea50a814bdc57f2e40cb6cd28ec2a.tar.bz2 cowlib-853efc34baeea50a814bdc57f2e40cb6cd28ec2a.zip |
Lowercase file extension in cow_mimetypes
Diffstat (limited to 'src')
-rw-r--r-- | src/cow_mimetypes.erl | 4 | ||||
-rw-r--r-- | src/cow_mimetypes.erl.src | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/cow_mimetypes.erl b/src/cow_mimetypes.erl index c2e6ef4..35f4c5f 100644 --- a/src/cow_mimetypes.erl +++ b/src/cow_mimetypes.erl @@ -23,7 +23,7 @@ all(Path) -> case filename:extension(Path) of <<>> -> {<<"application">>, <<"octet-stream">>, []}; - << $., Ext/binary >> -> all_ext(Ext) + << $., Ext/binary >> -> all_ext(string:lowercase(Ext)) end. %% @doc Return the mimetype for a Web related file by looking at its extension. @@ -32,7 +32,7 @@ all(Path) -> web(Path) -> case filename:extension(Path) of <<>> -> {<<"application">>, <<"octet-stream">>, []}; - << $., Ext/binary >> -> web_ext(Ext) + << $., Ext/binary >> -> web_ext(string:lowercase(Ext)) end. %% Internal. diff --git a/src/cow_mimetypes.erl.src b/src/cow_mimetypes.erl.src index 46ec112..dafbbde 100644 --- a/src/cow_mimetypes.erl.src +++ b/src/cow_mimetypes.erl.src @@ -23,7 +23,7 @@ all(Path) -> case filename:extension(Path) of <<>> -> {<<"application">>, <<"octet-stream">>, []}; - << $., Ext/binary >> -> all_ext(Ext) + << $., Ext/binary >> -> all_ext(string:lowercase(Ext)) end. %% @doc Return the mimetype for a Web related file by looking at its extension. @@ -32,7 +32,7 @@ all(Path) -> web(Path) -> case filename:extension(Path) of <<>> -> {<<"application">>, <<"octet-stream">>, []}; - << $., Ext/binary >> -> web_ext(Ext) + << $., Ext/binary >> -> web_ext(string:lowercase(Ext)) end. %% Internal. |