diff options
Diffstat (limited to 'src/cowboy_static.erl')
-rw-r--r-- | src/cowboy_static.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cowboy_static.erl b/src/cowboy_static.erl index ecca6fa..99ad82e 100644 --- a/src/cowboy_static.erl +++ b/src/cowboy_static.erl @@ -42,7 +42,7 @@ %% If the handler is configured to manage a directory, check that the %% requested file is inside the configured directory. --spec init(Req, opts()) -> {rest, Req, error | state()} when Req::cowboy_req:req(). +-spec init(Req, opts()) -> {cowboy_rest, Req, error | state()} when Req::cowboy_req:req(). init(Req, {Name, Path}) -> init_opts(Req, {Name, Path, []}); init(Req, {Name, App, Path}) @@ -87,7 +87,7 @@ init_dir(Req, Path, Extra) -> << Dir:Len/binary, $/, _/binary >> -> init_info(Req, Filepath, Extra); _ -> - {rest, Req, error} + {cowboy_rest, Req, error} end. fullpath(Path) -> @@ -105,7 +105,7 @@ fullpath([Segment|Tail], Acc) -> init_info(Req, Path, Extra) -> Info = file:read_file_info(Path, [{time, universal}]), - {rest, Req, {Path, Info, Extra}}. + {cowboy_rest, Req, {Path, Info, Extra}}. -ifdef(TEST). fullpath_test_() -> |