aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_script.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-04-15 12:24:18 +0000
committerIgor Sysoev <igor@sysoev.ru>2011-04-15 12:24:18 +0000
commit14fe2dd94a1c0605f73e7a909738aa247ae21fa6 (patch)
tree24863db39da8deca07fc33716b56e1ba77bbece4 /src/http/ngx_http_script.c
parent432760ee4d56dd6998baa66201e2c72c1dbc8038 (diff)
downloadnginx-14fe2dd94a1c0605f73e7a909738aa247ae21fa6.tar.gz
nginx-14fe2dd94a1c0605f73e7a909738aa247ae21fa6.zip
values starting with '0' were incorrectly assumed to be false
patch by Maxim Dounin
Diffstat (limited to 'src/http/ngx_http_script.c')
-rw-r--r--src/http/ngx_http_script.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c
index 8b861ce34..7c8de1445 100644
--- a/src/http/ngx_http_script.c
+++ b/src/http/ngx_http_script.c
@@ -265,7 +265,7 @@ ngx_http_test_predicates(ngx_http_request_t *r, ngx_array_t *predicates)
return NGX_ERROR;
}
- if (val.len && val.data[0] != '0') {
+ if (val.len && (val.len != 1 || val.data[0] != '0')) {
return NGX_DECLINED;
}
}