On Thu, Oct 31, 2019 at 5:48 PM Guillaume Quintard <
[email protected]> wrote:
>
> Hi,
>
> Varnish automatically transforms the 304 response into the object it
represents, this is why you are seeing the 200 (but it could be pretty much
any status that you are revalidating).
> If you want to check for 304s, you can do something like this:
>
> sub vcl_backend_response {
>     if (beresp.was_304) {
>         std.log("true_status: 304");
>     } else {
>         std.log("true_status: " + beresp.status);
>     }
> }
>
> and then use %{VSL:VCL_Log:true_status}x in the varnishncsa format line
to retrieve it

Thanks, that construct logs exactly what I wanted.

Rainer
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to