# HG changeset patch # User Igor Sysoev # Date 1302870258 0 # Node ID 5581586480e92b6842281c9659f3de76293d2352 # Parent 12d8d2f30205c9a1d89a7ff78f9a52abcd98cd90 values starting with '0' were incorrectly assumed to be false patch by Maxim Dounin diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c --- a/src/http/ngx_http_script.c +++ b/src/http/ngx_http_script.c @@ -265,7 +265,7 @@ ngx_http_test_predicates(ngx_http_reques return NGX_ERROR; } - if (val.len && val.data[0] != '0') { + if (val.len && (val.len != 1 || val.data[0] != '0')) { return NGX_DECLINED; } }