(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)).encode('iso-8859-1'))
                if 'Date' not in self.headers:
                    self._write(
                        ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
                    )
                if self.server_software and 'Server' not in self.headers:
                    self._write(('Server: %s\r\n' % self.server_software).encode('iso-8859-1'))
        else:
            self._write(('Status: %s\r\n' % self.status).encode('iso-8859-1'))
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 ) ) . encode ( 'iso-8859-1' ) ) if 'Date' not in self . headers : self . _write ( ( 'Date: %s\r\n' % format_date_time ( time . time ( ) ) ) . encode ( 'iso-8859-1' ) ) if self . server_software and 'Server' not in self . headers : self . _write ( ( 'Server: %s\r\n' % self . server_software ) . encode ( 'iso-8859-1' ) ) else : self . _write ( ( 'Status: %s\r\n' % self . status ) . encode ( 'iso-8859-1' ) )