diff src/http/modules/ngx_http_log_module.c @ 386:1172e6d6f40f NGINX_0_7_5

nginx 0.7.5 *) Bugfixes in variables support in the "access_log" directive; the bug had appeared in 0.7.4. *) Bugfix: nginx could not be built --without-http_gzip_module; the bug had appeared in 0.7.3. Thanks to Kirill A. Korinskiy. *) Bugfix: if sub_filter and SSI were used together, then responses might were transferred incorrectly.
author Igor Sysoev <http://sysoev.ru>
date Tue, 01 Jul 2008 00:00:00 +0400
parents 12defd37f578
children 6de24473fa70
line wrap: on
line diff
--- a/src/http/modules/ngx_http_log_module.c
+++ b/src/http/modules/ngx_http_log_module.c
@@ -422,7 +422,8 @@ ngx_http_log_script_write(ngx_http_reque
     {
         ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno,
                       ngx_open_file_n " \"%s\" failed", log.data);
-        return -1;
+        /* simulate successfull logging */
+        return len;
     }
 
     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
@@ -760,7 +761,8 @@ ngx_http_log_merge_loc_conf(ngx_conf_t *
         return NGX_CONF_OK;
     }
 
-    *conf = *prev;
+    conf->logs = prev->logs;
+    conf->off = prev->off;
 
     if (conf->logs || conf->off) {
         return NGX_CONF_OK;
@@ -781,6 +783,7 @@ ngx_http_log_merge_loc_conf(ngx_conf_t *
         return NGX_CONF_ERROR;
     }
 
+    log->script = NULL;
     log->disk_full_time = 0;
     log->error_log_time = 0;