Commit ef0d8ec1 authored by Nils Goroll's avatar Nils Goroll

doc polish: remove ambiguous statement about .activate()

"Typically it suffices...", IMHO, is in some way misleading and
contradictory to ".activate mus be called in vcl_deliver at all
levels" stated before.
parent c84e9b1f
...@@ -120,13 +120,11 @@ nesting), then it MUST be called on *all* levels of the response. If ...@@ -120,13 +120,11 @@ nesting), then it MUST be called on *all* levels of the response. If
``activate()`` is invoked at some ESI levels but not others, then the ``activate()`` is invoked at some ESI levels but not others, then the
results are undefined, and will very likely lead to a Varnish panic. results are undefined, and will very likely lead to a Varnish panic.
Typically it suffices to simply call ``activate()`` in It is also safe, for instance, to call ``activate()`` only if a
``vcl_deliver``, since the code in ``vcl_deliver`` is executed at request header is present, as in the example shown above; since the
every ESI level. It is also safe, for instance, to call ``activate()`` same request headers are set for every ESI subrequest, the result is
only if a request header is present, as in the example shown above; the same at every ESI level. But that should *not* be done if you have
since the same request headers are set for every ESI subrequest, the logic that unsets the header at some ESI levels but not at
result is the same at every ESI level. But that should *not* be done
if you have logic that unsets the header at some ESI levels but not at
others. Under no circumstances should the invocation of ``activate()`` others. Under no circumstances should the invocation of ``activate()``
depend on the value of ``req.esi_level``, or of ``req.url`` (since depend on the value of ``req.esi_level``, or of ``req.url`` (since
URLs are different at different ESI levels). URLs are different at different ESI levels).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment