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