Return a write method from start_response, as required by the wsgi spec.
This commit is contained in:
parent
32a31f4e8e
commit
5f4413bec4
|
@ -211,11 +211,13 @@ class WSGIContainer(object):
|
||||||
|
|
||||||
def __call__(self, request):
|
def __call__(self, request):
|
||||||
data = {}
|
data = {}
|
||||||
|
response = []
|
||||||
def start_response(status, response_headers, exc_info=None):
|
def start_response(status, response_headers, exc_info=None):
|
||||||
data["status"] = status
|
data["status"] = status
|
||||||
data["headers"] = response_headers
|
data["headers"] = response_headers
|
||||||
response = self.wsgi_application(
|
return response.append
|
||||||
WSGIContainer.environ(request), start_response)
|
response.extend(self.wsgi_application(
|
||||||
|
WSGIContainer.environ(request), start_response))
|
||||||
body = "".join(response)
|
body = "".join(response)
|
||||||
if hasattr(response, "close"):
|
if hasattr(response, "close"):
|
||||||
response.close()
|
response.close()
|
||||||
|
|
Loading…
Reference in New Issue