Content server: When WSGI embedding fix handling of empty URL

This commit is contained in:
Kovid Goyal 2011-09-23 13:28:38 -06:00
parent e03f31d7c0
commit 403eec1609

View File

@ -298,6 +298,10 @@ class CPWSGIApp(object):
You probably shouldn't call this; call self.__call__ instead,
so that any WSGI middleware in self.pipeline can run first.
"""
# Changed by Kovid as the routes dispatcher cannot handle an empty
# PATH_INFO
if not environ.get('PATH_INFO', True):
environ['PATH_INFO'] = '/'
return self.response_class(environ, start_response, self.cpapp)
def __call__(self, environ, start_response):