mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
fix: cowboy_static mimetypes type
This commit is contained in:
parent
022013b6c4
commit
7ca06ffac5
1 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@
|
|||
-type extra_charset() :: {charset, module(), function()} | {charset, binary()}.
|
||||
-type extra_etag() :: {etag, module(), function()} | {etag, false}.
|
||||
-type extra_mimetypes() :: {mimetypes, module(), function()}
|
||||
| {mimetypes, binary() | {binary(), binary(), [{binary(), binary()}]}}.
|
||||
| {mimetypes, binary() | {binary(), binary(), [{binary(), binary()}] | '*'}}.
|
||||
-type extra() :: [extra_charset() | extra_etag() | extra_mimetypes()].
|
||||
-type opts() :: {file | dir, string() | binary()}
|
||||
| {file | dir, string() | binary(), extra()}
|
||||
|
@ -332,7 +332,7 @@ forbidden(Req, State) ->
|
|||
%% Detect the mimetype of the file.
|
||||
|
||||
-spec content_types_provided(Req, State)
|
||||
-> {[{binary(), get_file}], Req, State}
|
||||
-> {[{binary() | {binary(), binary(), [{binary(), binary()}] | '*'}, get_file}], Req, State}
|
||||
when State::state().
|
||||
content_types_provided(Req, State={Path, _, Extra}) when is_list(Extra) ->
|
||||
case lists:keyfind(mimetypes, 1, Extra) of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue