# HG changeset patch # User Igor Sysoev # Date 1304416347 0 # Node ID 77f667dd050462675dc9e5d94aeab39fba92e502 # Parent 5cecc83776135b3a6c1e446074803c75e00afd09 test zero value in an "if" directive consistently with predicates fixed in r3894 thanks to 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 @@ -1395,7 +1395,7 @@ ngx_http_script_if_code(ngx_http_script_ e->sp--; - if (e->sp->len && e->sp->data[0] != '0') { + if (e->sp->len && (e->sp->len !=1 || e->sp->data[0] != '0')) { if (code->loc_conf) { e->request->loc_conf = code->loc_conf; ngx_http_update_location_config(e->request);