Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
3892:12d8d2f30205 | 3893:5581586480e9 |
---|---|
263 for (i = 0; i < predicates->nelts; i++) { | 263 for (i = 0; i < predicates->nelts; i++) { |
264 if (ngx_http_complex_value(r, &cv[i], &val) != NGX_OK) { | 264 if (ngx_http_complex_value(r, &cv[i], &val) != NGX_OK) { |
265 return NGX_ERROR; | 265 return NGX_ERROR; |
266 } | 266 } |
267 | 267 |
268 if (val.len && val.data[0] != '0') { | 268 if (val.len && (val.len != 1 || val.data[0] != '0')) { |
269 return NGX_DECLINED; | 269 return NGX_DECLINED; |
270 } | 270 } |
271 } | 271 } |
272 | 272 |
273 return NGX_OK; | 273 return NGX_OK; |