コード例 #1
0
ファイル: http.py プロジェクト: redtailtech/calendarserver
 def _finished(self, x):
     """
     We are finished writing data.
     But we need to check that we have also finished reading all data as we
     might have sent a, for example, 401 response before we read any data.
     To make sure that the stream/producer sequencing works properly we need
     to discard the remaining data in the request.
     """
     if self.stream.length != 0:
         return readAndDiscard(self.stream).addCallback(self._reallyFinished).addErrback(self._error)
     else:
         self._reallyFinished(x)
コード例 #2
0
ファイル: http.py プロジェクト: gingerkaan/serveros
 def _finished(self, x):
     """
     We are finished writing data.
     But we need to check that we have also finished reading all data as we
     might have sent a, for example, 401 response before we read any data.
     To make sure that the stream/producer sequencing works properly we need
     to discard the remaining data in the request.
     """
     if self.stream.length != 0:
         return readAndDiscard(self.stream).addCallback(self._reallyFinished).addErrback(self._error)
     else:
         self._reallyFinished(x)
コード例 #3
0
 def close(self):
     # Assume error will be raised again and handled by MMS?
     readAndDiscard(self).addErrback(lambda _: None)
コード例 #4
0
 def close(self):
     # Assume error will be raised again and handled by MMS?
     readAndDiscard(self).addErrback(lambda _: None)