wsgi.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Intranet-Penetration 作者: yuxiaokui 项目源码 文件源码
def handle(self):
        env = self.prepare_env()
        try:
            try:
                result = self.server.application(env, self.start_response)
                try:
                    self.data.extend(result)
                finally:
                    if hasattr(result, 'close'):
                        result.close()
            except GreenletExit:
                self._reply500()
                raise
            except:
                traceback.print_exc()
                try:
                    sys.stderr.write('%s: Failed to handle request:\n  request = %s\n  application = %s\n\n' %
                                     (self.server, self.request, self.server.application))
                except Exception:
                    pass
                self._reply500()
        finally:
            sys.exc_clear()
            if self is not None and self.code is not None:
                self.end(env)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号