mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Content server: When WSGI embedding fix handling of empty URL
This commit is contained in:
parent
e03f31d7c0
commit
403eec1609
@ -298,6 +298,10 @@ class CPWSGIApp(object):
|
|||||||
You probably shouldn't call this; call self.__call__ instead,
|
You probably shouldn't call this; call self.__call__ instead,
|
||||||
so that any WSGI middleware in self.pipeline can run first.
|
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)
|
return self.response_class(environ, start_response, self.cpapp)
|
||||||
|
|
||||||
def __call__(self, environ, start_response):
|
def __call__(self, environ, start_response):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user