Ticket #285: 285.patch

File 285.patch, 2.3 KB (added by Chris Beaven, 17 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,
     
    108108                'SERVER_PROTOCOL':   self._req.protocol,
    109109                'SERVER_SOFTWARE':   'mod_python'
    110110            }
     111            #raise TypeError, self._req.uri
    111112            for key, value in self._req.headers_in.items():
    112113                key = 'HTTP_' + key.upper().replace('-', '_')
    113114                self._meta[key] = value
  • 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