def httpconnection_patched_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)

def httpconnection_patched_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 )
send the currently buffered request and clear the buffer .