[Varnish] #795: Conditional GETs based on modification time are not honored if Last-Modified was not explicitly set

Varnish varnish-bugs at varnish-cache.org
Mon Nov 1 13:06:30 CET 2010


#795: Conditional GETs based on modification time are not honored if Last-
Modified was not explicitly set
-----------------------+----------------------------------------------------
  Reporter:  runa      |        Type:  defect
    Status:  reopened  |    Priority:  normal
 Milestone:            |   Component:  build 
   Version:  2.0       |    Severity:  normal
Resolution:            |    Keywords:        
-----------------------+----------------------------------------------------
Changes (by runa):

  * status:  closed => reopened
  * resolution:  wontfix =>


Comment:

 Weird. Is still not doing it (varnish-2.0.6)
 I added, in vcl_fetch:
 {{{
      if (!obj.http.last-modified) {
          set obj.http.last-modified = obj.http.date;
       }
 }}}

 but still, I get a 200 response

 {{{
 * About to connect() to www.sumavisos.com.ar port 80 (#0)
 *   Trying 173.45.100.10... connected
 * Connected to www.sumavisos.com.ar (173.45.100.10) port 80 (#0)
 > GET /autos/fiat HTTP/1.1
 > User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7
 OpenSSL/0.9.8n zlib/1.2.3.3 libidn/1.15
 > Host: www.sumavisos.com.ar
 > Accept: */*
 > If-Modified-Since: Mon, 01 Nov 2010 12:01:44 GMT
 >
 < HTTP/1.1 200 OK
 < Age: 6808
 < Date: Mon, 01 Nov 2010 12:02:06 GMT
 < Content-Length: 144232
 < Content-Type: text/html; charset=utf-8
 < Cache-Control: max-age=3600, s-maxage=3600
 < Server: nginx/0.7.65
 < Status: 200 OK
 < X-Runtime: 624
 < ETag: "df24b4c438a1274a2cafabc96296e6f4"
 < last-modified: Mon, 01 Nov 2010 12:01:44 GMT
 < X-Varnish: 232911537 232911446
 < X-Cache: HIT
 }}}

-- 
Ticket URL: <http://www.varnish-cache.org/trac/ticket/795#comment:2>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list