[Rt-commit] r7840 - rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface

ruz at bestpractical.com ruz at bestpractical.com
Sat May 12 11:06:34 EDT 2007


Author: ruz
Date: Sat May 12 11:06:32 2007
New Revision: 7840

Modified:
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm

Log:
* get rid of HTTP::Date requirement, replace it with our own date module

Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm	Sat May 12 11:06:32 2007
@@ -60,7 +60,6 @@
 
 
 package RT::Interface::Web;
-use HTTP::Date;
 use URI;
 
 use strict;
@@ -201,12 +200,15 @@
 =cut
 
 sub StaticFileHeaders {
+    my $date = RT::Date->new( $RT::SystemUser );
+
     # Expire things in a month.
-    $HTML::Mason::Commands::r->headers_out->{'Expires'} = HTTP::Date::time2str( time() + 2592000 );
+    $date->Set( Value => time + 30*24*60*60 );
+    $HTML::Mason::Commands::r->headers_out->{'Expires'} = $date->RFC2616;
 
     # Last modified at server start time
-    $HTML::Mason::Commands::r->headers_out->{'Last-Modified'} = HTTP::Date::time2str($^T);
-
+    $date->Set( Value => $^T );
+    $HTML::Mason::Commands::r->headers_out->{'Last-Modified'} = $date->RFC2616;
 }
 
 


More information about the Rt-commit mailing list