aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_variables.c
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2020-05-26 20:26:44 +0300
committerSergey Kandaurov <pluknet@nginx.com>2020-05-26 20:26:44 +0300
commit38091071a8ebef605433aef4b8c0a5b55845b43f (patch)
treee90b9a87999acd121234d156047c54f0d403aa5f /src/http/ngx_http_variables.c
parent2360f58a9b4515cfb5aa2d454892da70274ae183 (diff)
parentbab7ab047757c5e9e15fbd70880e2a3d27c75372 (diff)
downloadnginx-38091071a8ebef605433aef4b8c0a5b55845b43f.tar.gz
nginx-38091071a8ebef605433aef4b8c0a5b55845b43f.zip
Merged with the default branch.
Diffstat (limited to 'src/http/ngx_http_variables.c')
-rw-r--r--src/http/ngx_http_variables.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c
index e067cf0c2..c2113c843 100644
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -1075,7 +1075,7 @@ ngx_http_variable_argument(ngx_http_request_t *r, ngx_http_variable_value_t *v,
len = name->len - (sizeof("arg_") - 1);
arg = name->data + sizeof("arg_") - 1;
- if (ngx_http_arg(r, arg, len, &value) != NGX_OK) {
+ if (len == 0 || ngx_http_arg(r, arg, len, &value) != NGX_OK) {
v->not_found = 1;
return NGX_OK;
}