[z3-checkins] r42183 - z3/deliverance/trunk/deliverance

ianb at codespeak.net ianb at codespeak.net
Thu Apr 19 19:04:08 CEST 2007


Author: ianb
Date: Thu Apr 19 19:04:07 2007
New Revision: 42183

Modified:
   z3/deliverance/trunk/deliverance/wsgimiddleware.py
Log:
Don't theme non-200 responses

Modified: z3/deliverance/trunk/deliverance/wsgimiddleware.py
==============================================================================
--- z3/deliverance/trunk/deliverance/wsgimiddleware.py	(original)
+++ z3/deliverance/trunk/deliverance/wsgimiddleware.py	Thu Apr 19 19:04:07 2007
@@ -176,8 +176,12 @@
             
         status, headers, body = self.rebuild_check(environ, start_response)
 
-        # non-html responses, or rebuild is not necessary: bail out 
         if status is None:
+            # non-html responses, or rebuild is not necessary: bail out 
+            return body
+        if not status.startswith('200'):
+            # any non-200 response shouldn't be themed...
+            start_response(status, headers)
             return body
 
         # perform actual themeing 


More information about the z3-checkins mailing list