(self)
Ensure headers and content have both been sent
Ensure headers and content have both been sent
Ensure headers and content have both been sent
def finish_content(self):
        """Ensure headers and content have both been sent"""
        if not self.headers_sent:
            # Only zero Content-Length if not set by the application (so
            # that HEAD requests can be satisfied properly, see #3839)
            self.headers.setdefault('Content-Length', "0")
            self.send_headers()
        else:
            pass
def finish_content ( self ) : if not self . headers_sent : # Only zero Content-Length if not set by the application (so # that HEAD requests can be satisfied properly, see #3839) self . headers . setdefault ( 'Content-Length' , "0" ) self . send_headers ( ) else : pass