a few difficulties with trunk
Tollef Fog Heen
tfheen at varnish-software.com
Thu Mar 3 10:50:18 CET 2011
]] Fil
| 2. purge("req.http.host == " req.http.host);
| => fails on 'purge', Expected an action, 'if', '{' or '}'
| => ?
Use ban, not purge.
| 3. beresp.cacheable = false;
| => fails, can I safely replace it with beresp.ttl=0s; ?
.cacheable is gone, setting the ttl to 0s will make it not be cached.
| 5. I use a trick given by
| http://open.blogs.nytimes.com/2010/09/15/using-varnish-so-news-doesnt-break-your-server/
| if (beresp.http.X-VARNISH-TTL) {
| C{
| char *ttl;
| ttl = VRT_GetHdr(sp, HDR_BERESP, "\016X-VARNISH-TTL:");
| VRT_l_beresp_ttl(sp, atoi(ttl));
| }C
| remove beresp.http.X-VARNISH-TTL;
| }
|
| => fails to compile:
| ./vcl.1P9zoqAU.c: In function 'VGC_function_vcl_fetch':
| ./vcl.1P9zoqAU.c:879: warning: implicit declaration of function 'atoi'
You probably need C{ #include <stdlib.h> } near the top of the vcl file,
to make sure you have the atoi function declaration around.
--
Tollef Fog Heen
Varnish Software
t: +47 21 98 92 64
More information about the varnish-dev
mailing list