[Jifty-commit] r1247 - in jifty/trunk:
share/web/templates/__jifty/css
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sat Jun 10 22:15:15 EDT 2006
Author: trs
Date: Sat Jun 10 22:15:14 2006
New Revision: 1247
Modified:
jifty/trunk/ (props changed)
jifty/trunk/share/web/templates/__jifty/css/dhandler
Log:
r12834 at zot: tom | 2006-06-10 15:20:53 -0400
Send a 304 if If-Modified-Since matches our Last-Modified date
Modified: jifty/trunk/share/web/templates/__jifty/css/dhandler
==============================================================================
--- jifty/trunk/share/web/templates/__jifty/css/dhandler (original)
+++ jifty/trunk/share/web/templates/__jifty/css/dhandler Sat Jun 10 22:15:14 2006
@@ -1,10 +1,16 @@
<%init>
-$r->content_type("text/css");
Jifty->web->generate_css;
-use HTTP::Date qw();
-$r->header_out('Last-Modified'
- => HTTP::Date::time2str( Jifty->web->cached_css_mtime ));
+use HTTP::Date ();
+my $last_modified = HTTP::Date::time2str( Jifty->web->cached_css_mtime );
+
+if ( Jifty->handler->cgi->http('If-Modified-Since') eq $last_modified ) {
+ $r->header_out( Status => 304 );
+ return;
+}
+
+$r->content_type("text/css");
+$r->header_out('Last-Modified' => $last_modified);
Jifty->web->out( Jifty->web->cached_css );
return;
More information about the Jifty-commit
mailing list