(self)
If we're completing a chunked response, up-call to handle it like a
        regular reverse proxy.

        If we're completing a non-chunked response, fire the post-hooks.

        If we're completing a hijacked response, pass through the connection
        close.
If we're completing a chunked response, up-call to handle it like a
        regular reverse proxy.
If we re completing a chunked response up - call to handle it like a regular reverse proxy .
def handleResponseEnd(self):
        """
        If we're completing a chunked response, up-call to handle it like a
        regular reverse proxy.

        If we're completing a non-chunked response, fire the post-hooks.

        If we're completing a hijacked response, pass through the connection
        close.
        """
        if self.http:
            if self._streaming:
                return proxy.ProxyClient.handleResponseEnd(self)
            else:
                contentType = self.father.responseHeaders.getRawHeaders("content-type")
                if contentType:
                    contentType = contentType[0]
                else:
                    contentType = None
                body = self._responsePartBuffer
                self._fireListener(
                        {"PowerstripProtocolVersion": 1,
                         "ModifiedServerResponse":
                            {"Body": body,
                             "Code": self.father.code,
                             "ContentType": contentType}})
        else:
            self.father.transport.loseConnection()
def handleResponseEnd ( self ) : if self . http : if self . _streaming : return proxy . ProxyClient . handleResponseEnd ( self ) else : contentType = self . father . responseHeaders . getRawHeaders ( "content-type" ) if contentType : contentType = contentType [ 0 ] else : contentType = None body = self . _responsePartBuffer self . _fireListener ( { "PowerstripProtocolVersion" : 1 , "ModifiedServerResponse" : { "Body" : body , "Code" : self . father . code , "ContentType" : contentType } } ) else : self . father . transport . loseConnection ( )