diff options
author | franck cuny <franck@lumberjaph.net> | 2010-03-11 13:45:35 +0100 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-03-11 13:45:35 +0100 |
commit | 3e9dff3f8ca23c07e7077085d75229eaba765e97 (patch) | |
tree | aaaee60ac94e0581196d8529fa0edfcf32fe4a1c | |
parent | as miyagawa suggested, use file attributes to calculte ETag in case we have a... (diff) | |
download | plack-middleware-etag-3e9dff3f8ca23c07e7077085d75229eaba765e97.tar.gz |
fix
-rw-r--r-- | lib/Plack/Middleware/ETag.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Plack/Middleware/ETag.pm b/lib/Plack/Middleware/ETag.pm index d70bc35..ad1848f 100644 --- a/lib/Plack/Middleware/ETag.pm +++ b/lib/Plack/Middleware/ETag.pm @@ -11,15 +11,14 @@ our $VERSION = '0.01'; use parent qw/Plack::Middleware/; sub call { - my ( $self, $env ) = @_; - - my $res = $self->app->($env); - my $headers = $res->[1]; + my $self = shift; + my $res = $self->app->(@_); $self->response_cb( $res, sub { my $res = shift; + my $headers = $res->[1]; return if ( !defined $res->[2] );#|| ref $res->[2] ne 'ARRAY' ); return if ( Plack::Util::header_exists( $headers, 'ETag' ) ); my $etag; |