def dataDone(self):
        """
        Clear out any buffered data that may be hanging around.
        """
        self.clearLineBuffer()
        if self.state == "firstline":
            return
        if self.state != "body":
            self.reset()
            return
        if self.length == None:
            # No content-length header, so end of data signals message done
            self.messageDone()
        elif self.length < self.bodyReceived:
            # Aborted in the middle
            self.reset()
        else:
            # We have enough data and message wasn't finished? something is wrong
            raise RuntimeError("this should never happen")

        Clear out any buffered data that may be hanging around.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/sip.py