comparison src/http/modules/ngx_http_split_clients_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 834049edae24
children 8b635cf36ccc
comparison
equal deleted inserted replaced
4708:668de9844a02 4710:5a4666d4b6cb
136 if (ngx_http_compile_complex_value(&ccv) != NGX_OK) { 136 if (ngx_http_compile_complex_value(&ccv) != NGX_OK) {
137 return NGX_CONF_ERROR; 137 return NGX_CONF_ERROR;
138 } 138 }
139 139
140 name = value[2]; 140 name = value[2];
141
142 if (name.len < 2 || name.data[0] != '$') {
143 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
144 "invalid variable name \"%V\"", &name);
145 return NGX_CONF_ERROR;
146 }
147
141 name.len--; 148 name.len--;
142 name.data++; 149 name.data++;
143 150
144 var = ngx_http_add_variable(cf, &name, NGX_HTTP_VAR_CHANGEABLE); 151 var = ngx_http_add_variable(cf, &name, NGX_HTTP_VAR_CHANGEABLE);
145 if (var == NULL) { 152 if (var == NULL) {