
Have a look at section 3.4.1 (Clarifications>>Quoting): Within these constructs, quoting is REQUIRED for CR and "\" and for the character(s) that delimit the token (e.g., "(" and ")" for a comment). So, they're saying to backslash escape CR, "\" and double-quote for quoted-strings. HTH, --Grant On 2 Jan, 2007, at 09:19, david mugnai wrote:
Hi all,
tekNico and I found a problem with the web2 headers generation code.
We opened the ticket #2346 with a patch to the testcase and a patch to web2.http_headers.
We are not sure we correctly deciphered RFC 822, where it says:
quoted-string = <"> *(qtext/quoted-pair) <"> qtext = <any CHAR excepting <">, "\" & CR, and including linear- white-space> quoted-pair = "\" CHAR
Should the "&" character be construed as a linguistic comma:
qtext = qtext.replace('\r', '\\\r')
or as a logic AND?
qtext = qtext.replace('\\\r', '\\\\\r')
Thanks.
_______________________________________________ Twisted-web mailing list Twisted-web@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web