From: Igor Sysoev Date: Tue, 3 May 2011 09:52:27 +0000 (+0000) Subject: test zero value in an "if" directive consistently with predicates fixed in r3894 X-Git-Tag: release-1.0.1~1 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=eecc540da802ead2c784a1c5e655b285cc248b72;p=nginx.git 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 index 7c8de1445..a703f0837 100644 --- 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_engine_t *e) 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);