'Close and de-reference the current request and response. (Core)'

def close(self):

    streaming = _cherrypy.serving.response.stream
    self.cpapp.release_serving()
    if (streaming and is_closable_iterator(self.iter_response)):
        iter_close = self.iter_response.close
        try:
            iter_close()
        except Exception:
            _cherrypy.log(traceback=True, severity=40)
