Ticket #8381: 8381-r8423-2.diff
File 8381-r8423-2.diff, 959 bytes (added by , 16 years ago) |
---|
-
django/middleware/common.py
54 54 # trailing slash and there is no pattern for the current path 55 55 if settings.APPEND_SLASH and (not old_url[1].endswith('/')): 56 56 try: 57 urlresolvers.resolve(request.path )57 urlresolvers.resolve(request.path_info) 58 58 except urlresolvers.Resolver404: 59 59 new_url[1] = new_url[1] + '/' 60 60 if settings.DEBUG and request.method == 'POST': … … 69 69 if new_url != old_url: 70 70 # Redirect if the target url exists 71 71 try: 72 urlresolvers.resolve( new_url[1])72 urlresolvers.resolve(request.path_info + '/') 73 73 except urlresolvers.Resolver404: 74 74 pass 75 75 else: