Conditional GETs

Poul-Henning Kamp phk at
Sun Jul 29 21:46:03 CEST 2007

In message <3CBC6A7E-6437-48CF-81A8-B8DDD7E4B877 at>, Ricardo Newbery writes
>On Jul 29, 2007, at 3:52 AM, Dag-Erling Sm=F8rgrav wrote:
>> Ricardo Newbery <ric at> writes:
>>> What happens when a client sends a conditional request (either INM or
>>> IMS) and the content is not available in the Varnish cache?  I assume
>>> that Varnish will just relay the original conditional request through
>>> to the backend.
>> No, it will strip the conditional header before requesting the page  =
>> from
>> the backend.
>Okay, I think I understand.  So with Varnish in front, using the  =
>default VCL, there is no set of circumstances that will ever result  =
>in a conditional request to the backend.  Correct?


>But I can still change this behavior with a custom VCL.  Correct?
>Would the following work:
># perpetually refresh my cache
>vcl_timeout {
>         fetch;

This is not implemented yet, but once we have it...

># if not available in cache, pass client's IMS to backend
># and pass response back to client without caching
>vcl_miss {
>         if (req.http.If-Modified-Since) {
>                 pass;
>         }

This should work.

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the varnish-misc mailing list