From e10daf39fa08fb1367b277b31b4c9c9baad5239b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 2 Jan 2017 16:47:16 +0100 Subject: Numerous Dialyzer fixes --- src/cowboy_static.erl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/cowboy_static.erl') 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}. -- cgit v1.2.3