Ticket #3414: wsgi_path_from_many_params.diff

File wsgi_path_from_many_params.diff, 790 bytes (added by Jordi Funollet <jordi.f@…>, 17 years ago)

Patch against [5823]

  • 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        if environ['PATH_INFO']:
     78            self.path = force_unicode(environ['PATH_INFO'])
     79        elif environ.has_key('REDIRECT_URL') and environ['REDIRECT_URL']:
     80            self.path = force_unicode(environ['REDIRECT_URL'])
     81        else:
     82            self.path = force_unicode(environ.get('REQUEST_URI', '/'))
    7883        self.META = environ
    7984        self.method = environ['REQUEST_METHOD'].upper()
    8085
Back to Top