diff options
| author | franck cuny <franck@lumberjaph.net> | 2010-03-24 09:23:13 +0100 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2010-03-24 09:23:13 +0100 |
| commit | 2b432c6e35836fdec5c9477208d7f8f435c41ea1 (patch) | |
| tree | eb33569001e09974a6c009df5e6fb13c41aff4f8 /README | |
| parent | cealn POD, remove warn from test (diff) | |
| download | plack-middleware-etag-2b432c6e35836fdec5c9477208d7f8f435c41ea1.tar.gz | |
Checking in changes prior to tagging of version 0.01. Changelog diff is:
Diffstat (limited to 'README')
| -rw-r--r-- | README | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -5,12 +5,27 @@ SYNOPSIS use Plack::Builder; my $app = builder { - enable "Plack::Middleware::ETag"; + enable "Plack::Middleware::ETag", file_etag => [qw/inode mtime size/]; sub {['200', ['Content-Type' => 'text/html'}, ['hello world']]}; }; DESCRIPTION - Plack::Middleware::ETag adds automatically an ETag header. + Plack::Middleware::ETag adds automatically an ETag header. You may want + to use it with "Plack::Middleware::ConditionalGET". + + my $app = builder { + enable "Plack::Middleware::ConditionalGET"; + enable "Plack::Middleware::ETag", file_etag => "inode"; + sub {['200', ['Content-Type' => 'text/html'}, ['hello world']]}; + }; + + CONFIGURATION + file_etag + If the content is a file handle, the ETag will be set using the + inode, modified time and the file size. You can select which + attributes of the file will be used to set the ETag: + + enable "Plack::Middleware::ETag", file_etag => [qw/size/]; AUTHOR franck cuny <franck@lumberjaph.net> |
