'Send the currently buffered request and clear the buffer.
Appends an extra \r\n to the buffer.
A message_body may be specified, to be appended to the request.'

def _send_output(self, message_body=None):

    self._buffer.extend(('', ''))
    msg = '\r\n'.join(self._buffer)
    del self._buffer[:]
    if isinstance(message_body, str):
        msg += message_body
        message_body = None
    self.send(msg)
    if (message_body is not None):
        self.send(message_body)
    return
