[Zope-dev] [Zope2] Multiline response headers causing problems for proxies.

Laurence Rowe l at lrowe.co.uk
Tue Apr 19 11:06:54 EDT 2011


On 18 April 2011 17:01, Laurence Rowe <l at lrowe.co.uk> wrote:
> When using response.appendHeader, Zope appends the new value following
> an ",\r\n\t" which splits the header over multiple lines. While this
> behaviour is standards compliant, it causes problems for both Varnish
> [1] and Nginx [2] which may then mangle the header value.
>
> In fact the HTTP 1.0 spec notes that splitting over multiple lines in
> not recommended [3], though the HTTP 1.1 spec does not mention this
> explicitly, though it does say [4]:
>    "Applications ought to follow "common form", where one is known or
> indicated, when generating HTTP constructs, since there might exist
> some implementations that fail to accept anything"
>
> Are there any objections to me applying the attached patch to Zope
> 2.13 and trunk?
>
> Laurence
>
> [1] http://www.varnish-cache.org/trac/ticket/905
> [2] http://nginx.org/pipermail/nginx-devel/2011-April/000859.html
> [3] http://tools.ietf.org/html/rfc1945#section-4.2
> [4] http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html
>

I've now applied this to 2.13 and trunk. If it causes any problems, let me know.

Laurence


More information about the Zope-Dev mailing list