This matters for HTTP2 where there is an explicit end-stream marker.
def _write_body(self, start_read):
if self.request.body is not None:
self.connection.write(self.request.body)
- self.connection.finish()
elif self.request.body_producer is not None:
fut = self.request.body_producer(self.connection.write)
if is_future(fut):
self._read_response()
self.io_loop.add_future(fut, on_body_written)
return
- self.connection.finish()
+ self.connection.finish()
if start_read:
self._read_response()