Django

Code

Changeset 5688

Show
Ignore:
Timestamp:
07/13/07 09:33:46 (1 year ago)
Author:
mtredinnick
Message:

Fixed #4484 -- Fixed APPEND_SLASH handling to handle an empty path value.
Thanks, VesselinK.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/middleware/common.py

    r5483 r5688  
    4040        # Append a slash if append_slash is set and the URL doesn't have a 
    4141        # trailing slash or a file extension. 
    42         if settings.APPEND_SLASH and (old_url[1][-1] != '/') and ('.' not in old_url[1].split('/')[-1]): 
     42        if settings.APPEND_SLASH and (not old_url[1].endswith('/')) and ('.' not in old_url[1].split('/')[-1]): 
    4343            new_url[1] = new_url[1] + '/' 
    4444            if settings.DEBUG and request.method == 'POST':