code: def _read_body_until_close(self, response, file):
          '''Read the response until the connection closes.
  
          Coroutine.
          '''
          _logger.debug('Reading body until close.')
  
          file_is_async = hasattr(file, 'drain')
  
          while True:
              data = yield from self._connection.read(self._read_size)
  
              if not data:
                  break
  
              self._data_event_dispatcher.notify_read(data)
  
              content_data = self._decompress_data(data)
  
              if file:
                  file.write(content_data)
  
                  if file_is_async:
                      yield from file.drain()
  
          content_data = self._flush_decompressor()
  
          if file:
              file.write(content_data)
  
              if file_is_async:
                  yield from file.drain(f _read_body_until_close(self, response, file):
          '''Read the response until the connection closes.
  
          Coroutine.
          '''
          _logger.debug('Reading body until close.')
  
          file_is_async = hasattr(file, 'drain')
  
          while True:
              data = yield from self._connection.read(self._read_size)
  
              if not data:
                  break
  
              self._data_event_dispatcher.notify_read(data)
  
              content_data = self._decompress_data(data)
  
              if file:
                  file.write(content_data)
  
                  if file_is_async:
                      yield from file.drain()
  
          content_data = self._flush_decompressor()
  
          if file:
              file.write(content_data)
  
              if file_is_async:
                  yield from file.drain()
docs: Read the response until the connection closes.
  
          Coroutine.