comparison src/http/modules/ngx_http_log_module.c @ 388:6de24473fa70 NGINX_0_7_6

nginx 0.7.6 *) Bugfix: now if variables are used in the "access_log" directive a request root existence is always tested. *) Bugfix: the ngx_http_flv_module did not support several values in a query string.
author Igor Sysoev <http://sysoev.ru>
date Mon, 07 Jul 2008 00:00:00 +0400
parents 1172e6d6f40f
children 79c5df00501e
comparison
equal deleted inserted replaced
387:4cde8b18f2c9 388:6de24473fa70
364 ngx_str_t log, path; 364 ngx_str_t log, path;
365 ngx_open_file_info_t of; 365 ngx_open_file_info_t of;
366 ngx_http_log_loc_conf_t *llcf; 366 ngx_http_log_loc_conf_t *llcf;
367 ngx_http_core_loc_conf_t *clcf; 367 ngx_http_core_loc_conf_t *clcf;
368 368
369 if (r->err_status == NGX_HTTP_NOT_FOUND) { 369 if (!r->root_tested) {
370 370
371 /* test root directory existance */ 371 /* test root directory existance */
372 372
373 if (ngx_http_map_uri_to_path(r, &path, &root, 0) == NULL) { 373 if (ngx_http_map_uri_to_path(r, &path, &root, 0) == NULL) {
374 /* simulate successfull logging */ 374 /* simulate successfull logging */
385 of.min_uses = clcf->open_file_cache_min_uses; 385 of.min_uses = clcf->open_file_cache_min_uses;
386 of.errors = clcf->open_file_cache_errors; 386 of.errors = clcf->open_file_cache_errors;
387 of.events = clcf->open_file_cache_events; 387 of.events = clcf->open_file_cache_events;
388 388
389 if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool) 389 if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool)
390 != NGX_OK 390 != NGX_OK)
391 || !of.is_dir)
392 { 391 {
393 /* no root directory: simulate successfull logging */ 392 if (of.err == 0) {
393 /* simulate successfull logging */
394 return len;
395 }
396
397 ngx_log_error(NGX_LOG_ERR, r->connection->log, of.err,
398 "testing \"%s\" existence failed", path.data);
399
400 /* simulate successfull logging */
401 return len;
402 }
403
404 if (!of.is_dir) {
405 ngx_log_error(NGX_LOG_ERR, r->connection->log, NGX_ENOTDIR,
406 "testing \"%s\" existence failed", path.data);
407
408 /* simulate successfull logging */
394 return len; 409 return len;
395 } 410 }
396 } 411 }
397 412
398 if (ngx_http_script_run(r, &log, script->lengths->elts, 1, 413 if (ngx_http_script_run(r, &log, script->lengths->elts, 1,