From: Andy Grundman Date: Fri, 4 Nov 2005 14:51:27 +0000 (+0000) Subject: Removed the 304 Not Modified code from Static::Simple, it breaks under IE+Apache X-Git-Tag: v0.11~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Static-Simple.git;a=commitdiff_plain;h=766f4ce4c4047144e1644a848259a016e8b85beb Removed the 304 Not Modified code from Static::Simple, it breaks under IE+Apache --- diff --git a/Changes b/Changes index 78caaa9..49efe04 100644 --- a/Changes +++ b/Changes @@ -1,8 +1,11 @@ Revision history for Perl extension Catalyst::Plugin::Static::Simple 0.11 + - Removed the code that set the 304 Not Modified header. This caused + problems with IE under Apache. - Changed 5.5 writing method to pass an IO::File object directly to $c->res->body. + - This version is included with Catalyst 5.50. 0.10 2005-10-19 17:20:00 - Added tt2 to the list of ignored extensions. diff --git a/lib/Catalyst/Plugin/Static/Simple.pm b/lib/Catalyst/Plugin/Static/Simple.pm index 708b265..7e79cac 100644 --- a/lib/Catalyst/Plugin/Static/Simple.pm +++ b/lib/Catalyst/Plugin/Static/Simple.pm @@ -172,15 +172,6 @@ sub _serve_static { my $full_path = $c->_static_file; my $stat = stat $full_path; - # the below code all from C::P::Static - if ( $c->req->headers->if_modified_since ) { - if ( $c->req->headers->if_modified_since == $stat->mtime ) { - $c->res->status( 304 ); # Not Modified - $c->res->headers->remove_content_headers; - return 1; - } - } - $c->res->headers->content_type( $type ); $c->res->headers->content_length( $stat->size ); $c->res->headers->last_modified( $stat->mtime );