[Twisted-web] Ticket #2346: HTTP header generation in web2
according to RFC822
grant at osafoundation.org
Wed Jan 3 11:13:18 CST 2007
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
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-
> 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')
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
More information about the Twisted-web