Use $restrict

parent fc1ffc35
#- #-
# Copyright 2019 - 2021 UPLEX Nils Goroll Systemoptimierung # Copyright 2019 - 2023 UPLEX Nils Goroll Systemoptimierung
# All rights reserved # All rights reserved
# #
# Authors: Geoffrey Simmons <geoffrey.simmons@uplex.de> # Authors: Geoffrey Simmons <geoffrey.simmons@uplex.de>
...@@ -127,12 +127,9 @@ details see `RESOURCE USAGE, CONFIGURATION AND MONITORING`_ below. ...@@ -127,12 +127,9 @@ details see `RESOURCE USAGE, CONFIGURATION AND MONITORING`_ below.
$Function VOID activate() $Function VOID activate()
Enable parallel ESI processing for the client response. Enable parallel ESI processing for the client response.
``pesi.activate()`` MUST be called in ``vcl_deliver {}`` only. If it is $Restrict vcl_deliver
called in any other VCL subroutine, VCL failure is invoked (see
`ERRORS`_ below for details).
If ``pesi.activate()`` is called on *any* ESI level (any depth of include If ``pesi.activate()`` is called on *any* ESI level (any depth of include
nesting), then it MUST be called on *all* levels of the response. If nesting), then it MUST be called on *all* levels of the response. If
...@@ -216,8 +213,7 @@ identified by the ENUM ``parameter``. Currently the parameters can ...@@ -216,8 +213,7 @@ identified by the ENUM ``parameter``. Currently the parameters can
only be set with a boolean value in ``bool`` (but future versions of only be set with a boolean value in ``bool`` (but future versions of
this function may allow for setting other data types). this function may allow for setting other data types).
``pesi.set()`` MUST be called in ``vcl_deliver {}`` only; otherwise VCL $Restrict vcl_deliver
failure is invoked (see `ERRORS`_).
The parameters that can be set are currently ``serial`` and ``thread``: The parameters that can be set are currently ``serial`` and ``thread``:
......
...@@ -228,11 +228,7 @@ vmod_activate(VRT_CTX) ...@@ -228,11 +228,7 @@ vmod_activate(VRT_CTX)
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC); CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (ctx->method != VCL_MET_DELIVER) { assert(ctx->method == VCL_MET_DELIVER);
VRT_fail(ctx, "pesi.activate() may only be called "
"from vcl_deliver{}");
return;
}
req = ctx->req; req = ctx->req;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC); CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
...@@ -282,11 +278,7 @@ vmod_set(VRT_CTX, struct VARGS(set) *args) ...@@ -282,11 +278,7 @@ vmod_set(VRT_CTX, struct VARGS(set) *args)
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC); CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (ctx->method != VCL_MET_DELIVER) { assert(ctx->method == VCL_MET_DELIVER);
VRT_fail(ctx, "pesi.set() may only be called "
"from vcl_deliver{}");
return;
}
/* as of now, all parameters require a bool parameter */ /* as of now, all parameters require a bool parameter */
if (args->valid_bool == 0) { if (args->valid_bool == 0) {
......
...@@ -118,9 +118,7 @@ VOID activate() ...@@ -118,9 +118,7 @@ VOID activate()
Enable parallel ESI processing for the client response. Enable parallel ESI processing for the client response.
``pesi.activate()`` MUST be called in ``vcl_deliver {}`` only. If it is Restricted to: ``vcl_deliver``
called in any other VCL subroutine, VCL failure is invoked (see
`ERRORS`_ below for details).
If ``pesi.activate()`` is called on *any* ESI level (any depth of include If ``pesi.activate()`` is called on *any* ESI level (any depth of include
nesting), then it MUST be called on *all* levels of the response. If nesting), then it MUST be called on *all* levels of the response. If
...@@ -207,8 +205,7 @@ identified by the ENUM ``parameter``. Currently the parameters can ...@@ -207,8 +205,7 @@ identified by the ENUM ``parameter``. Currently the parameters can
only be set with a boolean value in ``bool`` (but future versions of only be set with a boolean value in ``bool`` (but future versions of
this function may allow for setting other data types). this function may allow for setting other data types).
``pesi.set()`` MUST be called in ``vcl_deliver {}`` only; otherwise VCL Restricted to: ``vcl_deliver``
failure is invoked (see `ERRORS`_).
The parameters that can be set are currently ``serial`` and ``thread``: The parameters that can be set are currently ``serial`` and ``thread``:
...@@ -794,7 +791,7 @@ COPYRIGHT ...@@ -794,7 +791,7 @@ COPYRIGHT
:: ::
Copyright 2019 - 2021 UPLEX Nils Goroll Systemoptimierung Copyright 2019 - 2023 UPLEX Nils Goroll Systemoptimierung
All rights reserved All rights reserved
Authors: Geoffrey Simmons <geoffrey.simmons@uplex.de> Authors: Geoffrey Simmons <geoffrey.simmons@uplex.de>
......
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