summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-03-24 09:23:13 +0100
committerfranck cuny <franck@lumberjaph.net>2010-03-24 09:23:13 +0100
commit2b432c6e35836fdec5c9477208d7f8f435c41ea1 (patch)
treeeb33569001e09974a6c009df5e6fb13c41aff4f8
parentcealn POD, remove warn from test (diff)
downloadplack-middleware-etag-2b432c6e35836fdec5c9477208d7f8f435c41ea1.tar.gz
Checking in changes prior to tagging of version 0.01. Changelog diff is:
-rw-r--r--.gitignore2
-rw-r--r--Makefile.PL2
-rw-r--r--README19
3 files changed, 21 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index c38068c..53d7b16 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,5 @@ Makefile.old
nytprof.out
MANIFEST.bak
*.sw[po]
+.prove
+MANIFEST.SKIP
diff --git a/Makefile.PL b/Makefile.PL
index 81394cb..1a961d5 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -14,4 +14,6 @@ readme_from 'lib/Plack/Middleware/ETag.pm';
build_requires 'Test::More';
use_test_base;
auto_include;
+auto_set_repository;
+license 'perl';
WriteAll;
diff --git a/README b/README
index dd680e0..bad02c5 100644
--- a/README
+++ b/README
@@ -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>