Ticket #285: 285.patch
File 285.patch, 2.3 KB (added by , 17 years ago) |
---|
-
django/core/handlers/base.py
65 65 66 66 resolver = urlresolvers.RegexURLResolver(r'^/', urlconf) 67 67 try: 68 callback, callback_args, callback_kwargs = resolver.resolve(request. path)68 callback, callback_args, callback_kwargs = resolver.resolve(request.META['PATH_INFO']) 69 69 70 70 # Apply view middleware 71 71 for middleware_method in self._view_middleware: -
django/core/handlers/modpython.py
94 94 'CONTENT_LENGTH': self._req.clength, # This may be wrong 95 95 'CONTENT_TYPE': self._req.content_type, # This may be wrong 96 96 'GATEWAY_INTERFACE': 'CGI/1.1', 97 'PATH_INFO': self._req. path_info,97 'PATH_INFO': self._req.uri, 98 98 'PATH_TRANSLATED': None, # Not supported 99 99 'QUERY_STRING': self._req.args, 100 100 'REMOTE_ADDR': self._req.connection.remote_ip, … … 108 108 'SERVER_PROTOCOL': self._req.protocol, 109 109 'SERVER_SOFTWARE': 'mod_python' 110 110 } 111 #raise TypeError, self._req.uri 111 112 for key, value in self._req.headers_in.items(): 112 113 key = 'HTTP_' + key.upper().replace('-', '_') 113 114 self._meta[key] = value -
django/core/handlers/wsgi.py
74 74 class WSGIRequest(http.HttpRequest): 75 75 def __init__(self, environ): 76 76 self.environ = environ 77 self.path = force_unicode(environ['PATH_INFO']) 77 self.path = ''.join((force_unicode(environ.get('SCRIPT_NAME') or ''), 78 force_unicode(environ['PATH_INFO']))) 78 79 self.META = environ 79 80 self.method = environ['REQUEST_METHOD'].upper() 80 81