Kaydet (Commit) 99bbaa00 authored tarafından Malcolm Tredinnick's avatar Malcolm Tredinnick

Allow avoidance of the Apache mod_rewrite undo.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst b653cdcf
......@@ -182,10 +182,11 @@ def get_script_name(environ):
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', ''))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment