summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_router.c
diff options
context:
space:
mode:
authorZhidao HONG <z.hong@f5.com>2022-07-14 04:32:49 +0800
committerZhidao HONG <z.hong@f5.com>2022-07-14 04:32:49 +0800
commit45b89e32577eef18e473d0c7ae24562e7efedcc0 (patch)
treed7058ec9ad0fb257897873cc1429182425d17b9b /src/nxt_router.c
parent7b80186f097fda3d1c0758a30efa889ec89c5a9d (diff)
downloadunit-45b89e32577eef18e473d0c7ae24562e7efedcc0.tar.gz
unit-45b89e32577eef18e473d0c7ae24562e7efedcc0.tar.bz2
Var: dynamic variables support.
This commit adds the variables $arg_NAME, $header_NAME, and $cookie_NAME.
Diffstat (limited to 'src/nxt_router.c')
-rw-r--r--src/nxt_router.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nxt_router.c b/src/nxt_router.c
index a3cc0a8d..e84b3d9a 100644
--- a/src/nxt_router.c
+++ b/src/nxt_router.c
@@ -1004,6 +1004,11 @@ nxt_router_temp_conf(nxt_task_t *task)
rtcf->mem_pool = mp;
+ rtcf->var_fields = nxt_array_create(mp, 4, sizeof(nxt_var_field_t));
+ if (nxt_slow_path(rtcf->var_fields == NULL)) {
+ goto fail;
+ }
+
tmp = nxt_mp_create(1024, 128, 256, 32);
if (nxt_slow_path(tmp == NULL)) {
goto fail;