aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_static.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-01-02 16:47:16 +0100
committerLoïc Hoguin <[email protected]>2017-01-02 16:47:16 +0100
commite10daf39fa08fb1367b277b31b4c9c9baad5239b (patch)
tree348ed3084f217ede4b05f722b81e536f9180f5a2 /src/cowboy_static.erl
parented664345d7c65922269bd89d70babffc97d9e095 (diff)
downloadcowboy-e10daf39fa08fb1367b277b31b4c9c9baad5239b.tar.gz
cowboy-e10daf39fa08fb1367b277b31b4c9c9baad5239b.tar.bz2
cowboy-e10daf39fa08fb1367b277b31b4c9c9baad5239b.zip
Numerous Dialyzer fixes
Diffstat (limited to 'src/cowboy_static.erl')
-rw-r--r--src/cowboy_static.erl3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cowboy_static.erl b/src/cowboy_static.erl
index d13db62..e7b2127 100644
--- a/src/cowboy_static.erl
+++ b/src/cowboy_static.erl
@@ -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}.