comparison src/http/ngx_http_core_module.c @ 4710:5a4666d4b6cb stable-1.2

Merge of r4636, r4637, r4638: config sanity checks. *) Added syntax checking of the second parameter of the "split_clients" directive. *) Capped the status code that may be returned with "return" and "try_files". *) Zero padded the returned and logged HTTP status code, and fixed possible buffer overrun in $status handling.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 29 Jun 2012 17:28:41 +0000
parents ba2c7463ce18
children 7d0c7bf2874d
comparison
equal deleted inserted replaced
4708:668de9844a02 4710:5a4666d4b6cb
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 }