0
Fork 0
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:
Loïc Hoguin 2017-01-02 16:47:16 +01:00
parent ed664345d7
commit e10daf39fa
No known key found for this signature in database
GPG key ID: 71366FF21851DF03
11 changed files with 43 additions and 35 deletions

View file

@ -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}.