values starting with '0' were incorrectly assumed to be false

patch by Maxim Dounin
This commit is contained in:
Igor Sysoev 2011-04-15 12:24:18 +00:00
parent 432760ee4d
commit 14fe2dd94a

View File

@ -265,7 +265,7 @@ ngx_http_test_predicates(ngx_http_request_t *r, ngx_array_t *predicates)
return NGX_ERROR; return NGX_ERROR;
} }
if (val.len && val.data[0] != '0') { if (val.len && (val.len != 1 || val.data[0] != '0')) {
return NGX_DECLINED; return NGX_DECLINED;
} }
} }