aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_static.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cowboy_static.erl')
-rw-r--r--src/cowboy_static.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_static.erl b/src/cowboy_static.erl
index 3b63afe..1b4ff89 100644
--- a/src/cowboy_static.erl
+++ b/src/cowboy_static.erl
@@ -158,7 +158,7 @@
%% {file, <<"index.html">>}]}
%%
%% %% Serve cowboy/priv/www/page.html under http://example.com/*/page
-%% {['*', <<"page">>], cowboy_static,
+%% {['_', <<"page">>], cowboy_static,
%% [{directory, {priv_dir, cowboy, [<<"www">>]}}
%% {file, <<"page.html">>}]}.
%%
@@ -451,7 +451,7 @@ path_to_mimetypes(Filepath, Extensions) when is_binary(Filepath) ->
-spec path_to_mimetypes_(binary(), [{binary(), [mimedef()]}]) -> [mimedef()].
path_to_mimetypes_(Ext, Extensions) ->
- case lists:keyfind(Ext, 1, Extensions) of
+ case lists:keyfind(cowboy_bstr:to_lower(Ext), 1, Extensions) of
{_, MTs} -> MTs;
_Unknown -> default_mimetype()
end.