Ejemplo n.º 1
0
 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()
Ejemplo n.º 2
0
 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