(self, code, message=None)
Send the response header only.
Send the response header only.
Send the response header only .
def send_response_only(self, code, message=None):
        """Send the response header only."""
        if self.request_version != 'HTTP/0.9':
            if message is None:
                if code in self.responses:
                    message = self.responses[code][0]
                else:
                    message = ''
            if not hasattr(self, '_headers_buffer'):
                self._headers_buffer = []
            self._headers_buffer.append(("%s %d %s\r\n" %
                    (self.protocol_version, code, message)).encode(
                        'latin-1', 'strict'))
def send_response_only ( self , code , message = None ) : if self . request_version != 'HTTP/0.9' : if message is None : if code in self . responses : message = self . responses [ code ] [ 0 ] else : message = '' if not hasattr ( self , '_headers_buffer' ) : self . _headers_buffer = [ ] self . _headers_buffer . append ( ( "%s %d %s\r\n" % ( self . protocol_version , code , message ) ) . encode ( 'latin-1' , 'strict' ) )