From 17af50812c47f5dec7e02e443c551b9697715729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 26 Mar 2014 19:05:59 +0100 Subject: Remove outdated comments, all edoc, plus a few minor tweaks --- src/cowboy_static.erl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/cowboy_static.erl') diff --git a/src/cowboy_static.erl b/src/cowboy_static.erl index 4bf84da..e979571 100644 --- a/src/cowboy_static.erl +++ b/src/cowboy_static.erl @@ -42,7 +42,7 @@ init(_, _, _) -> {upgrade, protocol, cowboy_rest}. -%% @doc Resolve the file that will be sent and get its file information. +%% Resolve the file that will be sent and get its file information. %% If the handler is configured to manage a directory, check that the %% requested file is inside the configured directory. @@ -197,7 +197,7 @@ bad_path_win32_check_test_() -> end} || P <- Tests]. -endif. -%% @doc Reject requests that tried to access a file outside +%% Reject requests that tried to access a file outside %% the target directory. -spec malformed_request(Req, State) @@ -205,7 +205,7 @@ bad_path_win32_check_test_() -> malformed_request(Req, State) -> {State =:= error, Req, State}. -%% @doc Directories, files that can't be accessed at all and +%% Directories, files that can't be accessed at all and %% files with no read flag are forbidden. -spec forbidden(Req, State) @@ -221,7 +221,7 @@ forbidden(Req, State={_, {ok, #file_info{access=Access}}, _}) forbidden(Req, State) -> {false, Req, State}. -%% @doc Detect the mimetype of the file. +%% Detect the mimetype of the file. -spec content_types_provided(Req, State) -> {[{binary(), get_file}], Req, State} @@ -236,7 +236,7 @@ content_types_provided(Req, State={Path, _, Extra}) -> {[{Type, get_file}], Req, State} end. -%% @doc Assume the resource doesn't exist if it's not a regular file. +%% Assume the resource doesn't exist if it's not a regular file. -spec resource_exists(Req, State) -> {boolean(), Req, State} @@ -246,7 +246,7 @@ resource_exists(Req, State={_, {ok, #file_info{type=regular}}, _}) -> resource_exists(Req, State) -> {false, Req, State}. -%% @doc Generate an etag for the file. +%% Generate an etag for the file. -spec generate_etag(Req, State) -> {{strong | weak, binary()}, Req, State} @@ -266,7 +266,7 @@ generate_default_etag(Size, Mtime) -> {strong, list_to_binary(integer_to_list( erlang:phash2({Size, Mtime}, 16#ffffffff)))}. -%% @doc Return the time of last modification of the file. +%% Return the time of last modification of the file. -spec last_modified(Req, State) -> {calendar:datetime(), Req, State} @@ -274,7 +274,7 @@ generate_default_etag(Size, Mtime) -> last_modified(Req, State={_, {ok, #file_info{mtime=Modified}}, _}) -> {Modified, Req, State}. -%% @doc Stream the file. +%% Stream the file. %% @todo Export cowboy_req:resp_body_fun()? -spec get_file(Req, State) -- cgit v1.2.3