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):
length,
delta)
def run_application(self):
self.result = self.application(self.environ, self.start_response)
def process_result(self):
for data in self.result:
if data:
self.write(data)
......@@ -394,6 +393,10 @@ class WSGIHandler(object):
self.wfile.writelines('0\r\n\r\n')
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):
self.time_start = time.time()
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