Django

Code

Changeset 7992

Show
Ignore:
Timestamp:
07/19/08 14:32:12 (6 months ago)
Author:
mtredinnick
Message:

Allow avoidance of the Apache mod_rewrite undo.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/handlers/base.py

    r7991 r7992  
    183183    SCRIPT_NAME isn't available there. 
    184184    """ 
    185     # If mod_rewrite had a whack at the URL, Apache set SCRIPT_URL to 
    186     # SCRIPT_NAME before applying any rewrites. 
    187     script_url = force_unicode(environ.get('SCRIPT_URL', '')) 
    188     if script_url: 
    189         return script_url 
     185    if not environ.get('DJANGO_USE_POST_REWRITE'): 
     186        # If mod_rewrite had a whack at the URL, Apache set SCRIPT_URL to 
     187        # SCRIPT_NAME before applying any rewrites. 
     188        script_url = force_unicode(environ.get('SCRIPT_URL', '')) 
     189        if script_url: 
     190            return script_url 
    190191    return force_unicode(environ.get('SCRIPT_NAME', '')) 
    191192