def parseAttributesFromRawString(self): self._content = "" stringIO = StringIO(self._rawString) self._startLine = SIPStartLineFactory().nextForStringIO(stringIO) self._header = SIPHeader.newParsedFrom(stringIO) self._content = stringIO.read() stringIO.close()
def _newForAttributes(cls, startLine=None, header=None, content=""): answer = cls() answer.startLine = startLine if header: answer.header = header else: answer.header = SIPHeader.newForAttributes(headerFields=None) answer.content = content return answer