send reason along with backend request

Hugo Cisneiros (Eitch) hugo.cisneiros at gmail.com
Wed Dec 14 15:23:01 CET 2011


On Wed, Dec 14, 2011 at 12:08 PM, Arjen Schat <arjen at thenextweb.com> wrote:
> Yep, that is too late in the process.
>
> Is the reason for the call to vcl_miss exposed? This would allow vcl_miss to set an extra bereq. Or is there a way to see which stats counters are updated by lookup?

I didn't quite understand the question, but vcl_miss is always called
when a lookup was made on an object and it wasn't in the cache (or the
object's ttl is expired in the cache). I think that was the original
question.

So in vcl_miss, you can define your headers using the bereq. variable,
for example:

set bereq.http.X-Radical-Header = "value"

And they will be send after vcl_miss returns (fetch).

-- 
[]'s
Hugo
www.devin.com.br




More information about the varnish-misc mailing list