diff options
author | Loïc Hoguin <[email protected]> | 2012-10-18 19:25:23 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2012-10-19 01:32:18 +0200 |
commit | d3277b08ce81d6180ad68dc91d5edda00c426544 (patch) | |
tree | 901d5471b3f22d059e9cc11842e660553cc598a1 | |
parent | e347ae40d0049fb8b012ba2126df62f868befa7b (diff) | |
download | cowboy-d3277b08ce81d6180ad68dc91d5edda00c426544.tar.gz cowboy-d3277b08ce81d6180ad68dc91d5edda00c426544.tar.bz2 cowboy-d3277b08ce81d6180ad68dc91d5edda00c426544.zip |
Fix examples in cowboy_static edoc
-rw-r--r-- | src/cowboy_static.erl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cowboy_static.erl b/src/cowboy_static.erl index 5450115..3b63afe 100644 --- a/src/cowboy_static.erl +++ b/src/cowboy_static.erl @@ -81,9 +81,9 @@ %% {<<".js">>, [<<"application/javascript">>]}]}]} %% %% %% Use the default database in the mimetypes application. -%% {[<<"static">>, '...', cowboy_static, +%% {[<<"static">>, '...'], cowboy_static, %% [{directory, {priv_dir, cowboy, []}}, -%% {mimetypes, {fun mimetypes:path_to_mimes/2, default}}]]} +%% {mimetypes, {fun mimetypes:path_to_mimes/2, default}}]} %% ''' %% %% == ETag Header Function == @@ -110,19 +110,19 @@ %% ==== Examples ==== %% ``` %% %% A value of default is equal to not specifying the option. -%% {[<<"static">>, '...', cowboy_static, +%% {[<<"static">>, '...'], cowboy_static, %% [{directory, {priv_dir, cowboy, []}}, -%% {etag, default}]]} +%% {etag, default}]} %% %% %% Use all avaliable ETag function arguments to generate a header value. -%% {[<<"static">>, '...', cowboy_static, +%% {[<<"static">>, '...'], cowboy_static, %% [{directory, {priv_dir, cowboy, []}}, -%% {etag, {attributes, [filepath, filesize, inode, mtime]}}]]} +%% {etag, {attributes, [filepath, filesize, inode, mtime]}}]} %% %% %% Use a user defined function to generate a strong ETag header value. -%% {[<<"static">>, '...', cowboy_static, +%% {[<<"static">>, '...'], cowboy_static, %% [{directory, {priv_dir, cowboy, []}}, -%% {etag, {fun generate_strong_etag/2, strong_etag_extra}}]]} +%% {etag, {fun generate_strong_etag/2, strong_etag_extra}}]} %% %% generate_strong_etag(Arguments, strong_etag_extra) -> %% {_, Filepath} = lists:keyfind(filepath, 1, Arguments), |