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

ianb at codespeak.net ianb at codespeak.net
Tue Mar 20 18:53:46 CET 2007


Author: ianb
Date: Tue Mar 20 18:53:45 2007
New Revision: 40855

Modified:
   z3/deliverance/trunk/deliverance/wsgimiddleware.py
Log:
Added XMLHttpRequest check (using header supplied by Prototype.js)

Modified: z3/deliverance/trunk/deliverance/wsgimiddleware.py
==============================================================================
--- z3/deliverance/trunk/deliverance/wsgimiddleware.py	(original)
+++ z3/deliverance/trunk/deliverance/wsgimiddleware.py	Tue Mar 20 18:53:45 2007
@@ -156,6 +156,8 @@
         environ[DELIVERANCE_BASE_URL] = construct_url(environ, with_path_info=False, with_query_string=False)
         environ[DELIVERANCE_CACHE] = {} 
         notheme = 'notheme' in qs
+        if environ.get('HTTP_X_REQUESTED_WITH', '') == 'XMLHttpRequest':
+            notheme = True
         if notheme:
             # eliminate the deliverance notheme query argument for the subrequest
             if qs == 'notheme': 


More information about the z3-checkins mailing list