On Wed, Jan 17, 2007 at 06:47:51PM -0500, Perrin Harkins wrote: > On Wed, 2007-01-17 at 17:42 -0500, John Cappiello wrote: > > Note we have POSIX loaded earlier. > > > > <%init> > > $r->header_out('Cache-Control', 'public,max-age=3600'); > > my $stat = File::stat::stat $m->request_comp->source_file; > > my $mtime = strftime("%a, %d %b %Y %H:%M:%S GMT", > > localtime($stat->mtime)); > > $r->header_out( 'Last-Modified', $mtime ); > > </%init> > > If you're using mod_perl, you can take advantage of the fast built-in > command for formatting HTTP time strings: > http://perl.apache.org/docs/2.0/api/Apache2/Util.html#C_ht_time_
Or you can just let mod_perl format it itself via set_last_modified: my $stat = File::stat::stat $m->request_comp->source_file; $r->set_last_modified( $stat->mtime ); Cheers, Gavin ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users