id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,branch,branch_author,launchpad_bug
2198,[SIP] patch for multiline headers,antoine,exarkun,"Here is a patch for multiline headers.

For unit testing, add the following at the beginning of test_sip.py:
{{{
# multiline headers (example from RFC 3261)
response_multiline = """"""\
SIP/2.0 200 OK
Via: SIP/2.0/UDP server10.biloxi.com
    ;branch=z9hG4bKnashds8;received=192.0.2.3
Via: SIP/2.0/UDP bigbox3.site3.atlanta.com
    ;branch=z9hG4bK77ef4c2312983.1;received=192.0.2.2
Via: SIP/2.0/UDP pc33.atlanta.com
    ;branch=z9hG4bK776asdhds ;received=192.0.2.1
To: Bob <sip:bob@biloxi.com>;tag=a6c85cf
From: Alice <sip:alice@atlanta.com>;tag=1928301774
Call-ID: a84b4c76e66710@pc33.atlanta.com
CSeq: 314159 INVITE
Contact: <sip:bob@192.0.2.4>
Content-Type: application/sdp
Content-Length: 0
\n"""""".replace(""\n"", ""\r\n"")
}}}

and then the following method in MessageParsingTestCase:

{{{
    def testMultiLine(self):
        l = self.l
        self.feedMessage(response_multiline)
        self.assertEquals(len(l), 1)
        m = l[0]
        self.assertEquals(m.headers['via'][0],
            ""SIP/2.0/UDP server10.biloxi.com;branch=z9hG4bKnashds8;received=192.0.2.3"")
        self.assertEquals(m.headers['via'][2],
            ""SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776asdhds ;received=192.0.2.1"")
}}}
",enhancement,closed,normal,,core,fixed,,thijs moijes12@…,branches/sip-multiline-2198,exarkun,
