Hello
I am using Varnish 3 in in front of apache with php. I need to set a cookie
in the browser every time the user doesn't receive a 503 response I use the
following code:
if(resp.status != 503) {
set resp.http.Set-Cookie = "my_error_cookie
=false; expires: Session; path=/";
}
The problem is that the cookies received from apache are rewritten, if I use
this I never receive the PHPSESSID cookie. For debug proposes I added this
code :
set resp.http.X-Cookie-Debug = "Response cookie: " +
resp.http.Set-Cookie;
if(resp.status != 503) {
set resp.http.Set-Cookie = "
my_error_cookie=false; expires: Session; path=/";
}
set resp.http.X-Cookie-Debug2 = "Response cookie2: " +
resp.http.Set-Cookie;
These are the headers that browser receives :
1. X-Cookie-Debug:
Response cookie: PHPSESSID=egf2tthsj0fm2bmt1oircumgk6; path=/
2. X-Cookie-Debug2:
Response cookie2: my_error_cookie=false; expires: Session; path=/
And there is only one Set-Cookie header :
Set-Cookie:
my_error_cookie=false; expires: Session; path=/
Can you tell me how can I set a new cookie without losing the cookies that
apache sends ?
Thank you very much
Cornel Vaideanu
PHP Developer
M:
[http://greppysystems.com/ftp/logo.png]
17-19A, Ploiesti Street,
Cluj-Napoca, Romania
www.greppysystems.com<http://greppysystems.com>
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc