Ticket #8381: 8381-r8423.diff
File 8381-r8423.diff, 964 bytes (added by , 16 years ago) |
---|
-
django/middleware/common.py
43 43 # Check for a redirect based on settings.APPEND_SLASH 44 44 # and settings.PREPEND_WWW 45 45 host = request.get_host() 46 old_url = [host, request.path ]46 old_url = [host, request.path_info] 47 47 new_url = old_url[:] 48 48 49 49 if (settings.PREPEND_WWW and old_url[0] and … … 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':