aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_core_module.c
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2012-05-16 13:22:03 +0000
committerRuslan Ermilov <ru@nginx.com>2012-05-16 13:22:03 +0000
commitbefc111d4f1b0986998e7fa0451f52e874afcb19 (patch)
tree7bbb641fba71f4d14d148ce5ad2feb94a10400ce /src/http/ngx_http_core_module.c
parent10c205a1b3641fe5cc68051467c82becb3af11de (diff)
downloadnginx-befc111d4f1b0986998e7fa0451f52e874afcb19.tar.gz
nginx-befc111d4f1b0986998e7fa0451f52e874afcb19.zip
Capped the status code that may be returned with "return" and "try_files".
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r--src/http/ngx_http_core_module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 31832ceb8..5bb01d9ea 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -4662,7 +4662,7 @@ ngx_http_core_try_files(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
code = ngx_atoi(tf[i - 1].name.data + 1, tf[i - 1].name.len - 2);
- if (code == NGX_ERROR) {
+ if (code == NGX_ERROR || code > 999) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"invalid code \"%*s\"",
tf[i - 1].name.len - 1, tf[i - 1].name.data);