コード例 #1
0
ファイル: wsgi.py プロジェクト: jesseward/stagehand
 def finish(self):
     # Prevent the socket from being closed, except for status 401 (auth needed)
     # TODO: if no Content-Length is specified, should close.
     if not self.handler.last_status.startswith('200') and self.command == 'POST':
         # Request was a POST but it did not succeed, so we must purge the
         # request body so it doesn't run into the next request.
         self.request.read(-1)
     if self.headers.get('Connection', '').lower() != 'keep-alive' or self.handler.last_status.startswith('401'):
         WSGIRequestHandler.finish(self)
コード例 #2
0
ファイル: __init__.py プロジェクト: rogerdodger1/kodi.web-pdb
 def close(self):
     WSGIRequestHandler.finish(self)
     asyncore.dispatcher.close(self)