Subject: [SIP] Re: SIP protocol: quoted strings and backslashes

From: Henning Schulzrinne <[email-masked]>
Date: Thu, 03 Aug 2000 22:03:38 -0400

> 
> According to the definitions of quoted-string and comments
> in draft-ietf-sip-rfc2543bis-00.ps, page 118, a quoted
> string can use the backslash (\) as a single-character
> quoting mechanism, where NUL, CR and LF are also characters.
> 
> This makes it possible to divide a quoted string among
> lines by ending the line with a backslash. Thus:
> -------------------------
> Comment-Field:  "A long \
> string: one line."
> -------------------------
> defines one field according to the grammar.  However,
> the line continuation convention requires spacing characters
> at the beginning of the second line.
> 
> I assume that using \ for this purpose is not allowed,
> but I didn't find an example in the torture tests
> from the SIP Telephony Call Flow Examples.

Interesting (if peculiar) example. This syntax is directly from
HTTP/1.1, which is also silent on the topic how implementations should
handle this. Strictly speaking it depends on what the line separator is.
If you have

To: "Some string\[CR][LF]
continued

Only the CR is escaped. The LF begins another line and would need to be
indented.

On the other hand

To: "Some string\[CR]
continued"

is just a single line. Should definitely be added to the torture tests.

> Best regards,
> Richard Verhoeven

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip