diff src/http/ngx_http_script.c @ 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 e7798b5e990a
children 77f667dd0504
line wrap: on
line diff
--- a/src/http/ngx_http_script.c	Fri Apr 15 10:59:57 2011 +0000
+++ b/src/http/ngx_http_script.c	Fri Apr 15 12:24:18 2011 +0000
@@ -265,7 +265,7 @@
             return NGX_ERROR;
         }
 
-        if (val.len && val.data[0] != '0') {
+        if (val.len && (val.len != 1 || val.data[0] != '0')) {
             return NGX_DECLINED;
         }
     }