comparison src/http/ngx_http_variables.c @ 184:71ff1e2b484a NGINX_0_3_39

nginx 0.3.39 *) Feature: the "uninitialized_variable_warn" directive; the logging level of the "uninitialized variable" message was lowered from "alert" to "warn". *) Feature: the "override_charset" directive. *) Change: now if the unknown variable is used in the "echo" and "if expr='$name'" SSI-commands, then the "unknown variable" message is not logged. *) Bugfix: the active connection counter increased on the exceeding of the connection limit specified by the "worker_connections" directive; bug appeared in 0.2.0. *) Bugfix: the limit rate might not work on some condition; bug appeared in 0.3.38.
author Igor Sysoev <http://sysoev.ru>
date Mon, 17 Apr 2006 00:00:00 +0400
parents 87699398f955
children 54aabf2b0bc6
comparison
equal deleted inserted replaced
183:f4b38f37ca5b 184:71ff1e2b484a
322 return ngx_http_get_indexed_variable(r, index); 322 return ngx_http_get_indexed_variable(r, index);
323 } 323 }
324 324
325 325
326 ngx_http_variable_value_t * 326 ngx_http_variable_value_t *
327 ngx_http_get_variable(ngx_http_request_t *r, ngx_str_t *name, ngx_uint_t key) 327 ngx_http_get_variable(ngx_http_request_t *r, ngx_str_t *name, ngx_uint_t key,
328 ngx_uint_t nowarn)
328 { 329 {
329 ngx_http_variable_t *v; 330 ngx_http_variable_t *v;
330 ngx_http_variable_value_t *vv; 331 ngx_http_variable_value_t *vv;
331 ngx_http_core_main_conf_t *cmcf; 332 ngx_http_core_main_conf_t *cmcf;
332 333
375 } 376 }
376 377
377 return NULL; 378 return NULL;
378 } 379 }
379 380
380 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
381 "unknown \"%V\" variable", name);
382
383 vv->not_found = 1; 381 vv->not_found = 1;
382
383 if (nowarn == 0) {
384 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
385 "unknown \"%V\" variable", name);
386 }
384 387
385 return vv; 388 return vv;
386 } 389 }
387 390
388 391