[Varnish] #439: adding several cookie will remove redirection

Varnish varnish-bugs at projects.linpro.no
Mon Mar 2 10:59:01 CET 2009


#439: adding several cookie will remove redirection
------------------------+---------------------------------------------------
 Reporter:  scouzinier  |        Owner:  phk  
     Type:  defect      |       Status:  new  
 Priority:  normal      |    Milestone:       
Component:  varnishd    |      Version:  trunk
 Severity:  normal      |   Resolution:       
 Keywords:              |  
------------------------+---------------------------------------------------
Changes (by phk):

  * owner:  => phk
  * component:  build => varnishd

Old description:

> header Location is remove by varnish if we use several time Set-Cookie.
>
> this header will should redirect the user.
> It's work without varnish, not with varnish.
> HTTP/1.1 302 Found
> Date: Mon, 09 Feb 2009 10:52:43 GMT
> Server: Apache
> Set-Cookie: SiteNameClient=qmdjrt7t1gp79elac25vhf8bg5; path=/;
> domain=.toto.fr
> Expires: Mon, 26 Jul 1997 05:00:00 GMT
> Cache-Control: no-cache, must-revalidate
> Pragma: no-cache
> Last-Modified: Mon, 09 Feb 2009 10:52:43 GMT
> X-Powered-By: eZ Publish
> Served-by: org-www.toto.fr
> Content-language: fr-FR
> Set-Cookie: user_logged=non; path=/; domain=.toto.fr
> Set-Cookie: session_user_logged=non; path=/; domain=.toto.fr
> Set-Cookie: user_info=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT;
> path=/; domain=.toto.fr
> Set-Cookie: EZ_TICKET=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT;
> path=/; domain=.toto.fr:80
> Set-Cookie: cine1=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
> domain=.toto.fr
> Set-Cookie: id1=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
> domain=.toto.fr
> Set-Cookie: cine2=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
> domain=.toto.fr
> Set-Cookie: id2=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
> domain=.toto.fr
> Set-Cookie: cine3=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
> domain=.toto.fr
> Set-Cookie: id3=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
> domain=.toto.fr
> Set-Cookie: cine4=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
> domain=.toto.fr
> Set-Cookie: id4=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
> domain=.toto.fr
> Set-Cookie: user_logged=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT;
> path=/; domain=.toto.fr
> Set-Cookie: username=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT;
> path=/; domain=.toto.fr
> Set-Cookie: clubtoto_grade=deleted; expires=Sun, 10-Feb-2008 10:52:42
> GMT; path=/; domain=.toto.fr
> Set-Cookie: clubtoto_action=deleted; expires=Sun, 10-Feb-2008 10:52:42
> GMT; path=/; domain=.toto.fr
> Set-Cookie: clubtoto_points=deleted; expires=Sun, 10-Feb-2008 10:52:42
> GMT; path=/; domain=.toto.fr
> Set-Cookie: clubtoto_grade_id=deleted; expires=Sun, 10-Feb-2008 10:52:42
> GMT; path=/; domain=.toto.fr
> Set-Cookie: avatar_toto=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT;
> path=/; domain=.toto.fr:80
> Set-Cookie: toto_fileavatar=deleted; expires=Sun, 10-Feb-2008 10:52:42
> GMT; path=/; domain=.toto.fr:80
> Location: http://org-www.toto.fr
> Content-Length: 200
> Connection: close
> Content-Type: text/html; charset=utf-8
>

> Sample page:
> <?php
> header("HTTP/1.x 302 Found");
> header("Server: Apache");
> header("Last-Modified: Mon, 09 Feb 2009 08:53:13 GMT");
> header("X-Powered-By: eZ Publish");
> header("Served-by: org-www.toto.fr");
> header("Content-Language: fr-FR");
>
> header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
> header("Cache-Control: no-cache, must-revalidate");
> header("Pragma: no-cache");
> header("Date: Mon, 09 Feb 2009 08:53:13 GMT");
>
> for($i=0;$i<=18;$i++)
>         setcookie("a$i","a$i", time()+3600,"/",".toto.fr");
>
> header("Location: http://org-www.toto.fr/");
>

> ?>
>
> When max value for $i  is 17, the page will work with varnish
> When max value for $i  is 18, the page won't work with varnish

New description:

 header Location is remove by varnish if we use several time Set-Cookie.

 this header will should redirect the user.
 It's work without varnish, not with varnish.
 {{{
 HTTP/1.1 302 Found
 Date: Mon, 09 Feb 2009 10:52:43 GMT
 Server: Apache
 Set-Cookie: SiteNameClient=qmdjrt7t1gp79elac25vhf8bg5; path=/;
 domain=.toto.fr
 Expires: Mon, 26 Jul 1997 05:00:00 GMT
 Cache-Control: no-cache, must-revalidate
 Pragma: no-cache
 Last-Modified: Mon, 09 Feb 2009 10:52:43 GMT
 X-Powered-By: eZ Publish
 Served-by: org-www.toto.fr
 Content-language: fr-FR
 Set-Cookie: user_logged=non; path=/; domain=.toto.fr
 Set-Cookie: session_user_logged=non; path=/; domain=.toto.fr
 Set-Cookie: user_info=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT;
 path=/; domain=.toto.fr
 Set-Cookie: EZ_TICKET=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT;
 path=/; domain=.toto.fr:80
 Set-Cookie: cine1=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
 domain=.toto.fr
 Set-Cookie: id1=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
 domain=.toto.fr
 Set-Cookie: cine2=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
 domain=.toto.fr
 Set-Cookie: id2=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
 domain=.toto.fr
 Set-Cookie: cine3=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
 domain=.toto.fr
 Set-Cookie: id3=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
 domain=.toto.fr
 Set-Cookie: cine4=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
 domain=.toto.fr
 Set-Cookie: id4=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT; path=/;
 domain=.toto.fr
 Set-Cookie: user_logged=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT;
 path=/; domain=.toto.fr
 Set-Cookie: username=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT;
 path=/; domain=.toto.fr
 Set-Cookie: clubtoto_grade=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT;
 path=/; domain=.toto.fr
 Set-Cookie: clubtoto_action=deleted; expires=Sun, 10-Feb-2008 10:52:42
 GMT; path=/; domain=.toto.fr
 Set-Cookie: clubtoto_points=deleted; expires=Sun, 10-Feb-2008 10:52:42
 GMT; path=/; domain=.toto.fr
 Set-Cookie: clubtoto_grade_id=deleted; expires=Sun, 10-Feb-2008 10:52:42
 GMT; path=/; domain=.toto.fr
 Set-Cookie: avatar_toto=deleted; expires=Sun, 10-Feb-2008 10:52:42 GMT;
 path=/; domain=.toto.fr:80
 Set-Cookie: toto_fileavatar=deleted; expires=Sun, 10-Feb-2008 10:52:42
 GMT; path=/; domain=.toto.fr:80
 Location: http://org-www.toto.fr
 Content-Length: 200
 Connection: close
 Content-Type: text/html; charset=utf-8
 }}}

 Sample page:
 {{{
 <?php
 header("HTTP/1.x 302 Found");
 header("Server: Apache");
 header("Last-Modified: Mon, 09 Feb 2009 08:53:13 GMT");
 header("X-Powered-By: eZ Publish");
 header("Served-by: org-www.toto.fr");
 header("Content-Language: fr-FR");

 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
 header("Cache-Control: no-cache, must-revalidate");
 header("Pragma: no-cache");
 header("Date: Mon, 09 Feb 2009 08:53:13 GMT");

 for($i=0;$i<=18;$i++)
         setcookie("a$i","a$i", time()+3600,"/",".toto.fr");

 header("Location: http://org-www.toto.fr/");


 ?>
 }}}

 When max value for $i  is 17, the page will work with varnish
 When max value for $i  is 18, the page won't work with varnish

-- 
Ticket URL: <http://varnish.projects.linpro.no/ticket/439#comment:2>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator


More information about the varnish-bugs mailing list