check response status in WSGIContext._app_call
Only re-chain response iter if start_response hasn't been called yet. Change-Id: I9670f49419104fb8f949e6edc12d9047d1289cde
This commit is contained in:
parent
4236e6379b
commit
5c8f9c52e3
@ -262,7 +262,11 @@ class WSGIContext(object):
|
||||
"""
|
||||
Ensures start_response has been called before returning.
|
||||
"""
|
||||
resp = iter(self.app(env, self._start_response))
|
||||
resp = self.app(env, self._start_response)
|
||||
# if start_response has been called, just return the iter
|
||||
if self._response_status is not None:
|
||||
return resp
|
||||
resp = iter(resp)
|
||||
try:
|
||||
first_chunk = resp.next()
|
||||
except StopIteration:
|
||||
|
Loading…
x
Reference in New Issue
Block a user