From: Igor Sysoev Date: Fri, 15 Apr 2011 12:24:18 +0000 (+0000) Subject: values starting with '0' were incorrectly assumed to be false X-Git-Tag: release-1.0.1~12 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=14fe2dd94a1c0605f73e7a909738aa247ae21fa6;p=nginx.git 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 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; } }