[PATCH] backend conditional requests first release

Dmitry Panov dmitry.panov at yahoo.co.uk
Wed Mar 2 12:56:55 CET 2011


Hi Geoff,

Thanks for the patch. I have tried it and it appears to be working. I've 
just spotted one problem so far: it looks like the gziped flag is not 
copied from the stale object it is possible to serve gziped object to a 
client that doesn't support it. I'm new to varnish and I'm not familiar 
with the code yet, but the following patch solved the problem for me:

--- cache_http.c.orig    2011-03-02 11:51:10.000000000 +0000
+++ cache_http.c    2011-03-02 11:05:20.000000000 +0000
@@ -988,6 +988,7 @@
                  http_SetResp(o->http, "HTTP/1.1", 200, "OK Not Modified");
                  http_SetH(o->http, HTTP_HDR_REQ, "GET");
                  http_copyh(o->http, sp->wrk->bereq, HTTP_HDR_URL);
+                sp->obj->gziped = o_stale->gziped;

                  break;



On 02/03/2011 10:40, Geoff Simmons wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On 3/1/11 5:49 PM, Geoff Simmons wrote:
>> Here's our first release of the "If-Modified-Since" function (backend
>> conditional requests).
>>
>> I'll be posting up a Wiki page about how it works, and what's still to
>> be done, and open issues.
> http://www.varnish-cache.org/trac/wiki/BackendConditionalRequests
>
> We'd appreciate any feedback, especially about the open issues listed at
> the bottom of the page.
>
>
> Thanks,
> Geoff
> - -- 
> UPLEX Systemoptimierung
> Schwanenwik 24
> 22087 Hamburg
> http://uplex.de/
> Mob: +49-176-63690917
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQIcBAEBCAAGBQJNbh66AAoJEOUwvh9pJNURgB4P/1NrmCMCRpK9DG2S6PA/x8Yn
> 0DE3kS7NEdGDGI8Q9wZNF2XJ8PNigLTY/Ey6uupxW7v/MM3/9cfH05y5vAB3yhHf
> /sYjoKV6kLx41tQlW2ihSKQIQ7CJTcJAEqOunsydR2q3CY1Bd9xkiQCjYTZHHO80
> ARg8ewRxf6otIgnDzBcsisMTl3ot5L8pelUHEjKMUJuQ08JwIqXL04xFVWKJeUPf
> bGYnpJB6MlKwvGkXvRS8RjtHsbpKGVKykFZYNUhsDYlkkvHQ3BrmedWAeoGgAjq9
> As9oQEJrKeIH+RVr1Jal878op9zV84gzkF6p+JXWZY9kPBYBEloI/iCdzKT8UqCw
> Qwy3u4BiuqcJKz1STpSLpBNCGmcW6bfigZvtTHFNn1Po+j1VgY8JBMQQ2Y3lOZba
> Tyqdy6Kz0LL91J1w+J48SiDoUrsldvU/6V05AwoORIjBHloCQN5nsAVo97MBZwqi
> wwaI/Bapm0sZuSNPWrVzwNmoY1rwwFs0TPnrkB4HiacSU3N7FR1nDuZZ6+JtG1Y5
> 6H3zhbsnD97tEDf18vIO1mlCkoVIWDlrNRWd0/EabdSJEE9D+Q/QXUjmvvWgD7ci
> A/orZgyHnwf/hsEA7umDpUN+2wk52g27B8R4RbgoKtK9+3SCA7ybVJu+vP9yvSER
> gzepfFd4KX/h9HWzw2We
> =hFKQ
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> varnish-dev mailing list
> varnish-dev at varnish-cache.org
> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Best regards,

-- 
Dmitry Panov





More information about the varnish-dev mailing list