comparison src/http/ngx_http_variables.c @ 635:18268abd340c release-0.3.39

nginx-0.3.39-RELEASE import *) 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; the bug had appeared in 0.2.0. *) Bugfix: the limit rate might not work on some condition; the bug had appeared in 0.3.38.
author Igor Sysoev <igor@sysoev.ru>
date Mon, 17 Apr 2006 19:55:41 +0000
parents 65bf042c0b4f
children e60fe4cf1d4e
comparison
equal deleted inserted replaced
634:af8e20368022 635:18268abd340c
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