(self)
Transmit version/status/date/server, via self._write()
Transmit version/status/date/server, via self._write()
Transmit version / status / date / server via self . _write ()
def send_preamble(self):
        """Transmit version/status/date/server, via self._write()"""
        if self.origin_server:
            if self.client_is_modern():
                self._write('HTTP/%s %s\r\n' % (self.http_version,self.status))
                if 'Date' not in self.headers:
                    self._write(
                        'Date: %s\r\n' % format_date_time(time.time())
                    )
                if self.server_software and 'Server' not in self.headers:
                    self._write('Server: %s\r\n' % self.server_software)
        else:
            self._write('Status: %s\r\n' % self.status)
def send_preamble ( self ) : if self . origin_server : if self . client_is_modern ( ) : self . _write ( 'HTTP/%s %s\r\n' % ( self . http_version , self . status ) ) if 'Date' not in self . headers : self . _write ( 'Date: %s\r\n' % format_date_time ( time . time ( ) ) ) if self . server_software and 'Server' not in self . headers : self . _write ( 'Server: %s\r\n' % self . server_software ) else : self . _write ( 'Status: %s\r\n' % self . status )