mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Numerous Dialyzer fixes
This commit is contained in:
parent
ed664345d7
commit
e10daf39fa
11 changed files with 43 additions and 35 deletions
|
@ -285,10 +285,9 @@ last_modified(Req, State={_, {ok, #file_info{mtime=Modified}}, _}) ->
|
|||
{Modified, Req, State}.
|
||||
|
||||
%% Stream the file.
|
||||
%% @todo Export cowboy_req:resp_body_fun()?
|
||||
|
||||
-spec get_file(Req, State)
|
||||
-> {{stream, non_neg_integer(), fun()}, Req, State}
|
||||
-> {{sendfile, 0, non_neg_integer(), binary()}, Req, State}
|
||||
when State::state().
|
||||
get_file(Req, State={Path, {ok, #file_info{size=Size}}, _}) ->
|
||||
{{sendfile, 0, Size, Path}, Req, State}.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue