Commit bbda6b9a authored by Denis Bilenko's avatar Denis Bilenko

pywsgi: split run_application() into run_application() and process_result()

parent 5a66bc83
...@@ -383,8 +383,7 @@ class WSGIHandler(object): ...@@ -383,8 +383,7 @@ class WSGIHandler(object):
length, length,
delta) delta)
def run_application(self): def process_result(self):
self.result = self.application(self.environ, self.start_response)
for data in self.result: for data in self.result:
if data: if data:
self.write(data) self.write(data)
...@@ -394,6 +393,10 @@ class WSGIHandler(object): ...@@ -394,6 +393,10 @@ class WSGIHandler(object):
self.wfile.writelines('0\r\n\r\n') self.wfile.writelines('0\r\n\r\n')
self.response_length += 5 self.response_length += 5
def run_application(self):
self.result = self.application(self.environ, self.start_response)
self.process_result()
def handle_one_response(self): def handle_one_response(self):
self.time_start = time.time() self.time_start = time.time()
self.status = None self.status = None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment