diff options
Diffstat (limited to 'src/http/ngx_http_variables.c')
-rw-r--r-- | src/http/ngx_http_variables.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c index 5aac76b76..0bd6b7ec6 100644 --- a/src/http/ngx_http_variables.c +++ b/src/http/ngx_http_variables.c @@ -1269,12 +1269,13 @@ ngx_http_variables_init_vars(ngx_conf_t *cf) for (n = 0; n < cmcf->variables_keys->keys.nelts; n++) { - if (v[i].name.len == key[n].key.len + av = key[n].value; + + if (av->get_handler + && v[i].name.len == key[n].key.len && ngx_strncmp(v[i].name.data, key[n].key.data, v[i].name.len) == 0) { - av = key[n].value; - v[i].get_handler = av->get_handler; v[i].data = av->data; |