Mercurial > hg > nginx-quic
changeset 7359:b5ea47df9bee
Cache: status must be less then 599 in *_cache_valid directives.
Previously, configurations with typo, for example
fastcgi_cache_valid 200301 302 5m;
successfully pass configuration test. Adding check for status
codes > 599, and such configurations are now properly rejected.
author | Gena Makhomed <gmm@csdoc.com> |
---|---|
date | Mon, 24 Sep 2018 20:26:46 +0300 |
parents | 170922952477 |
children | 8f25a44d9add |
files | src/http/ngx_http_file_cache.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_file_cache.c +++ b/src/http/ngx_http_file_cache.c @@ -2669,7 +2669,7 @@ ngx_http_file_cache_valid_set_slot(ngx_c } else { status = ngx_atoi(value[i].data, value[i].len); - if (status < 100) { + if (status < 100 || status > 599) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "invalid status \"%V\"", &value[i]); return NGX_CONF_ERROR;