From: <[EMAIL PROTECTED]>

   When adding the XML body to a SIP message, should each line in the
   XML body be terminated by a "\r\n" sequence or only a "\n"
   character?

Lines in an XML document can be ended with "\n", or "\r\n", or even by
"\r", but all lines must be ended the same way.  All line endings are
implicitly changed to "\n" before the XML is parsed.  (See the XML
specifications.)

An XML document is a sequence of *characters*, and we must be aware of
how the characters are encoded as bytes, but SIP uses UTF-8 encoding
unless a header specifies otherwise.  (RFC 3261 section 7.4.1) So \r
and \n are represented by the usual 13 and 10 (decimal) bytes.

All SIP implementations that accept XML bodies must handle all of
these alternatives.

Dale
_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Reply via email to