[PATCH] Concatenate Set-Cookie headers before a call to vcl_fetch()
sky at crucially.net
Mon Jun 7 19:49:16 CEST 2010
No, browser break if you do that.
(Nginx source bug reports about this)
On Jun 7, 2010, at 10:47 AM, Laurence Rowe wrote:
> On 6 June 2010 22:33, lee doolan <lee.doolan at volcanomail.com> wrote:
>> Well, the 'Set-Cookie' header is unique amongst the headers of an
>> response in the respect that it can occur multiple times. VCL has no
>> facility for looping over these headers and deciding which ones to
>> remove and which ones to keep.
> This is true for all headers. See:
> Multiple message-header fields with the same field-name MAY be present
> in a message if and only if the entire field-value for that header
> field is defined as a comma-separated list [i.e., #(values)]. It MUST
> be possible to combine the multiple header fields into one
> "field-name: field-value" pair, without changing the semantics of the
> message, by appending each subsequent field-value to the first, each
> separated by a comma. The order in which header fields with the same
> field-name are received is therefore significant to the interpretation
> of the combined field value, and thus a proxy MUST NOT change the
> order of these field values when a message is forwarded.
> So it should be fine for a proxy like Varnish to combine the multiple
> headers into a single header, no need for any special X-Set-Cookies.
More information about the varnish-dev