[Jifty-commit] r1317 - in jifty/trunk: share/web/templates/__jifty/css

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Mon Jun 19 12:28:39 EDT 2006


Author: trs
Date: Mon Jun 19 12:28:39 2006
New Revision: 1317

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/share/web/templates/__jifty/css/dhandler

Log:
 r13224 at zot:  tom | 2006-06-19 12:28:27 -0400
 Only serve squished CSS for seemingly "valid" requests.  Punt other requests to /static/css/ in an attempt to do what is meant if something is borked.  This ensures that if files can't be @import'd and the @import statements still exist in the squished CSS that a loop doesn't start.


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	Mon Jun 19 12:28:39 2006
@@ -1,4 +1,10 @@
 <%init>
+if ( $m->dhandler_arg !~ /^[0-9a-f]{32}\.css$/ ) {
+    # This doesn't look like a real request for squished CSS,
+    # so redirect to a more failsafe place
+    Jifty->web->redirect( "/static/css/" . $m->dhandler_arg );
+}
+
 Jifty->web->generate_css;
 
 use HTTP::Date ();


More information about the Jifty-commit mailing list