Alecs Henry wrote:
> Hi Per,
> 
> Here's what I got:
> -------------
> vcl.load test /usr/local/etc/varnish/configs/test.vcl
> 106 267    
> *Variable 'obj.http.X-Cache' not accessible in method 'vcl_miss'.*
> At: (/usr/local/etc/varnish/configs/test.vcl Line 62 Pos 13)
>         set obj.http.X-Cache = "TCP_MISS from " server.ip;
> ------------################------------------------------
> VCL compilation failed
> -------------
> 
> It works just fine for vcl_hit though.
> Any ideas?
> 

'obj' is only available in 'hit' and 'fetch'. So set it in vcl_fetch.
The only side effect being then your header will be set in the case of a
'pass' as well, which may or may not be what you want.

-- 
[EMAIL PROTECTED]
http://www.endpoint.com
_______________________________________________
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc

Reply via email to