<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
Sorry that I did not elaborate this enough. Let me get into details:<br>
<br>
We are running a magento web shop with a varnish layer in front of
it on a separate server. At some point, the applications has to tell
Varnish that it cannot use cached content, this happens by the
setting the following header:<br>
<br>
<pre><code>Set-Cookie: EXTERNAL_NO_CACHE=1; expires=Thu, 10-Nov-2011 15:49:57 GMT; path=/; domain=XXXXXXXXX; httponly
<b>In the default.vcl the following happens the following in the sub vcl_fetch method:</b>
if (beresp.http.Set-Cookie ~ "NO_CACHE=") {
return (pass)
}
Since there are multiple set-cookie headers, varnish will only be able to analyze the first Set-Cookie header.
This means that if-condition above fails and that it will not return a "pass" causing the application to serve cached content while it shouldn't.
I have compiled </code>the header vmod<code> and imported it at the top of default.vcl. (import header;)
And I replaced the following:</code>
<code>
if (beresp.http.Set-Cookie ~ "NO_CACHE=") {</code>
with:
header.copy(beresp.http.Set-Cookie, beresp.http.X-Old-Cookie);
<code>if (beresp.http.X-Old-Cookie ~ "NO_CACHE=") {</code>
This still did not fix the issue.
Thanks for responding so quickly, if there is anything else we need to let you know, please tell us.
Awaiting your reply.
Kind regards,
Kenny
<code>
</code></pre>
<br>
<div class="moz-signature"><br>
<img src="cid:part1.08040707.05030407@ac-systems.com" border="0"></div>
<br>
On 11/14/2011 11:58 AM, Kristian Lyngstol wrote:
<blockquote cite="mid:20111114105809.GB5602@freud.kly.no"
type="cite">
<pre wrap="">Hi,
On Mon, Nov 14, 2011 at 09:42:59AM +0100, Kenny Deckers wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I'm having the following issue with "multiple set-cookie headers":
</pre>
</blockquote>
<pre wrap="">(...)
What issue? You are not saying anything about what you wan to
accomplish.
Your web server sends multiple set-cookie headers. I assume you entered
the stars yourself.
What are you trying to accomplish, and what have you actually tried with
the header vmod?
- Kristian
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.messagelabs.com/email">http://www.messagelabs.com/email</a>
______________________________________________________________________
</pre>
</blockquote>
</body>
</html>