[Rt-commit] r9559 - rt/branches/3.6-RELEASE/lib/RT/Interface

ruz at bestpractical.com ruz at bestpractical.com
Tue Nov 6 04:59:05 EST 2007


Author: ruz
Date: Tue Nov  6 04:59:01 2007
New Revision: 9559

Modified:
   rt/branches/3.6-RELEASE/lib/RT/Interface/Web.pm

Log:
* don't send Last-Modified field in a response
* make cache public

Modified: rt/branches/3.6-RELEASE/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Interface/Web.pm	(original)
+++ rt/branches/3.6-RELEASE/lib/RT/Interface/Web.pm	Tue Nov  6 04:59:01 2007
@@ -214,11 +214,16 @@
 =cut
 
 sub StaticFileHeaders {
+    # make cache public
+    $HTML::Mason::Commands::r->headers_out->{'Cache-Control'} = 'public';
+
     # Expire things in a month.
     $HTML::Mason::Commands::r->headers_out->{'Expires'} = HTTP::Date::time2str( time() + 2592000 );
 
+    # if we set 'Last-Modified' then browser request a comp using 'If-Modified-Since'
+    # request, but we don't handle it and generate full reply again
     # Last modified at server start time
-    $HTML::Mason::Commands::r->headers_out->{'Last-Modified'} = HTTP::Date::time2str($^T);
+    #$HTML::Mason::Commands::r->headers_out->{'Last-Modified'} = HTTP::Date::time2str($^T);
 
 }
 


More information about the Rt-commit mailing list