Author: mtredinnick
Date: 2008-07-19 14:32:12 -0500 (Sat, 19 Jul 2008)
New Revision: 7992
Modified:
django/trunk/django/core/handlers/base.py
Log:
Allow avoidance of the Apache mod_rewrite undo.
Modified: django/trunk/django/core/handlers/base.py
===================================================================
--- django/trunk/django/core/handlers/base.py 2008-07-19 19:32:01 UTC (rev
7991)
+++ django/trunk/django/core/handlers/base.py 2008-07-19 19:32:12 UTC (rev
7992)
@@ -182,10 +182,11 @@
Note: this isn't used by the mod_python handler, since the equivalent of
SCRIPT_NAME isn't available there.
"""
- # If mod_rewrite had a whack at the URL, Apache set SCRIPT_URL to
- # SCRIPT_NAME before applying any rewrites.
- script_url = force_unicode(environ.get('SCRIPT_URL', ''))
- if script_url:
- return script_url
+ if not environ.get('DJANGO_USE_POST_REWRITE'):
+ # If mod_rewrite had a whack at the URL, Apache set SCRIPT_URL to
+ # SCRIPT_NAME before applying any rewrites.
+ script_url = force_unicode(environ.get('SCRIPT_URL', ''))
+ if script_url:
+ return script_url
return force_unicode(environ.get('SCRIPT_NAME', ''))
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---