Ticket #285: 285.2.patch

File 285.2.patch, 1.9 KB (added by SmileyChris, 8 years ago)
  • django/core/handlers/base.py

     
    6565
    6666        resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
    6767        try:
    68             callback, callback_args, callback_kwargs = resolver.resolve(request.path)
     68            callback, callback_args, callback_kwargs = resolver.resolve(request.META['PATH_INFO'])
    6969
    7070            # Apply view middleware
    7171            for middleware_method in self._view_middleware:
  • django/core/handlers/modpython.py

     
    9494                'CONTENT_LENGTH':    self._req.clength, # This may be wrong
    9595                'CONTENT_TYPE':      self._req.content_type, # This may be wrong
    9696                'GATEWAY_INTERFACE': 'CGI/1.1',
    97                 'PATH_INFO':         self._req.path_info,
     97                'PATH_INFO':         self._req.uri,
    9898                'PATH_TRANSLATED':   None, # Not supported
    9999                'QUERY_STRING':      self._req.args,
    100100                'REMOTE_ADDR':       self._req.connection.remote_ip,
  • django/core/handlers/wsgi.py

     
    7474class WSGIRequest(http.HttpRequest):
    7575    def __init__(self, environ):
    7676        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'])))
    7879        self.META = environ
    7980        self.method = environ['REQUEST_METHOD'].upper()
    8081
Back to Top