Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 4636:ed957e0daeb4
Capped the status code that may be returned with "return" and "try_files".
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 16 May 2012 13:22:03 +0000 |
parents | f39138a69e0a |
children | cebbe4fda8aa |
comparison
equal
deleted
inserted
replaced
4635:9c9fbdbe9383 | 4636:ed957e0daeb4 |
---|---|
4660 | 4660 |
4661 if (tf[i - 1].name.data[0] == '=') { | 4661 if (tf[i - 1].name.data[0] == '=') { |
4662 | 4662 |
4663 code = ngx_atoi(tf[i - 1].name.data + 1, tf[i - 1].name.len - 2); | 4663 code = ngx_atoi(tf[i - 1].name.data + 1, tf[i - 1].name.len - 2); |
4664 | 4664 |
4665 if (code == NGX_ERROR) { | 4665 if (code == NGX_ERROR || code > 999) { |
4666 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 4666 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
4667 "invalid code \"%*s\"", | 4667 "invalid code \"%*s\"", |
4668 tf[i - 1].name.len - 1, tf[i - 1].name.data); | 4668 tf[i - 1].name.len - 1, tf[i - 1].name.data); |
4669 return NGX_CONF_ERROR; | 4669 return NGX_CONF_ERROR; |
4670 } | 4670 } |