[Varnish] #432: Multiple lines of Set-Cookie in response headers aren't reflected in obj.http.Set-Cookie
Varnish
varnish-bugs at projects.linpro.no
Sun Feb 1 21:23:38 CET 2009
#432: Multiple lines of Set-Cookie in response headers aren't reflected in
obj.http.Set-Cookie
----------------------+-----------------------------------------------------
Reporter: Mitchua | Owner: phk
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: 2.0
Severity: normal | Keywords: Set-Cookie
----------------------+-----------------------------------------------------
My backend server returns headers like this:
HTTP/1.1·200·OK(CR)(LF)[[BR]]
Connection:·close(CR)(LF)[[BR]]
Date:·Sun,·01·Feb·2009·20:19:18·GMT(CR)(LF)[[BR]]
Server:·Microsoft-IIS/6.0(CR)(LF)[[BR]]
X-Powered-By:·ASP.NET(CR)(LF)[[BR]]
X-AspNet-Version:·2.0.50727(CR)(LF)[[BR]]
Set-
Cookie:·ASP.NET_SessionId=6js5wg45dby44ujan0de1zit;·path=/;·HttpOnly(CR)(LF)[[BR]]
Set-Cookie:·ThreadId=2688;·path=/(CR)(LF)[[BR]]
Set-
Cookie:·Invite=;·expires=Fri,·30-Jan-2009·20:19:18·GMT;·path=/(CR)(LF)[[BR]]
Cache-Control:·no-cache(CR)(LF)[[BR]]
Pragma:·no-cache(CR)(LF)[[BR]]
Expires:·-1(CR)(LF)[[BR]]
Content-Type:·text/html;·charset=utf-8(CR)(LF)[[BR]]
Content-Length:·17739(CR)(LF)[[BR]]
(CR)(LF)[[BR]]
Note that there are 3 cookies being set on 3 Set-Cookie headers. I would
like to remove the ASP.NET_SessionId cookie, but keep the others. I found
the regsub technique from
http://varnish.projects.linpro.no/wiki/VCLExampleRemovingSomeCookies to be
helpful, but obj.http.Set-Cookie only appears to have the first cookie in
it i.e. everything before the first carriage-return. All other Set-Cookie
headers are removed if I do a "set obj.http.Set-Cookie". It looks like
it might be a bug.
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/432>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list