[Varnish] #907: Varnish alternates between 200 and 304 responses with ETags

Varnish varnish-bugs at varnish-cache.org
Tue May 3 10:18:16 CEST 2011


#907: Varnish alternates between 200 and 304 responses with ETags
---------------------+------------------------------------------------------
  Reporter:  lrowe   |        Type:  defect  
    Status:  closed  |    Priority:  normal  
 Milestone:          |   Component:  varnishd
   Version:  2.1.5   |    Severity:  normal  
Resolution:  fixed   |    Keywords:          
---------------------+------------------------------------------------------
Changes (by Tollef Fog Heen <tfheen@…>):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 (In [a7c18717f45390231bf62cfedcf805458b26ca26]) Round down synthesized
 last-modified timestamp in object

 Commit 3bd239e9b2361c96b1acf1c03bce9c50baaf838d makes it so we set the
 object's last-modified timestamp to the current timestamp if there's
 no Last-Modified header.  This makes it so we can do conditional gets
 even when there's no Last-Modified or ETag header from the backend.
 However, the time entered was a float, so we effectively ended up with
 an off-by-up-to-one-minus-epsilon error.  This lead to requests ending
 up in a 304/200 response code round-dance.

 We now round the timestamp down to the nearest whole second instead,
 which should fix this bug.  Thanks to lrowe for a helpful bug report.

 Fixes: #907

-- 
Ticket URL: </ticket/907#comment:1>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list