changeset 3893:5581586480e9

values starting with '0' were incorrectly assumed to be false patch by Maxim Dounin
author Igor Sysoev <igor@sysoev.ru>
date Fri, 15 Apr 2011 12:24:18 +0000
parents 12d8d2f30205
children 4d4b5770616f
files src/http/ngx_http_script.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
         }
     }