From 052afaa36d327993532eaef2427841d12ad6c8af Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 26 Apr 2006 15:17:20 +0000 Subject: Changes with nginx 0.3.43 26 Apr 2006 *) Bugfix: in the SSI. --- CHANGES | 5 +++++ CHANGES.ru | 5 +++++ src/core/nginx.h | 2 +- src/core/ngx_buf.c | 6 ++++++ src/http/modules/ngx_http_ssi_filter_module.c | 17 +++++++++++++++++ src/http/ngx_http_core_module.c | 8 +++++--- src/http/ngx_http_postpone_filter_module.c | 3 ++- 7 files changed, 41 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index d8d147c85..48314191a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,9 @@ +Changes with nginx 0.3.43 26 Apr 2006 + + *) Bugfix: in the SSI. + + Changes with nginx 0.3.42 26 Apr 2006 *) Feature: the "bind" option of the "listen" directive in IMAP/POP3 diff --git a/CHANGES.ru b/CHANGES.ru index dea89c3d9..a8eae7746 100644 --- a/CHANGES.ru +++ b/CHANGES.ru @@ -1,4 +1,9 @@ +Изменения в nginx 0.3.43 26.04.2006 + + *) Исправление: в SSI. + + Изменения в nginx 0.3.42 26.04.2006 *) Добавление: параметр bind в директиве listen в IMAP/POP3 прокси. diff --git a/src/core/nginx.h b/src/core/nginx.h index d8be2a77e..9a08f130f 100644 --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,7 +8,7 @@ #define _NGINX_H_INCLUDED_ -#define NGINX_VER "nginx/0.3.42" +#define NGINX_VER "nginx/0.3.43" #define NGINX_VAR "NGINX" #define NGX_OLDPID_EXT ".oldbin" diff --git a/src/core/ngx_buf.c b/src/core/ngx_buf.c index 31d990315..901c3f540 100644 --- a/src/core/ngx_buf.c +++ b/src/core/ngx_buf.c @@ -134,6 +134,12 @@ ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain, ngx_chain_t *in) } while (in) { + + if (ngx_buf_sync_only(in->buf)) { + in = in->next; + continue; + } + cl = ngx_alloc_chain_link(pool); if (cl == NULL) { return NGX_ERROR; diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c index dba3639df..82ee7ac33 100644 --- a/src/http/modules/ngx_http_ssi_filter_module.c +++ b/src/http/modules/ngx_http_ssi_filter_module.c @@ -737,6 +737,8 @@ ngx_http_ssi_output(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx) #if 1 b = NULL; for (cl = ctx->out; cl; cl = cl->next) { + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "ssi out: %p %p", cl->buf, cl->buf->pos); if (cl->buf == b) { ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, "the same buf was used in ssi"); @@ -1685,6 +1687,9 @@ ngx_http_ssi_echo(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, var = params[NGX_HTTP_SSI_ECHO_VAR]; + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "ssi echo \"%V\"", var); + key = 0; for (i = 0; i < var->len; i++) { @@ -1798,6 +1803,9 @@ ngx_http_ssi_set(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, name = params[NGX_HTTP_SSI_SET_VAR]; value = params[NGX_HTTP_SSI_SET_VALUE]; + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "ssi set \"%V\" \"%V\"", name, value); + if (ngx_http_ssi_evaluate_string(r, ctx, value, 0) != NGX_OK) { return NGX_HTTP_SSI_ERROR; } @@ -1861,6 +1869,9 @@ ngx_http_ssi_if(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, expr = params[NGX_HTTP_SSI_IF_EXPR]; + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "ssi if expr=\"%V\"", expr); + left.data = expr->data; last = expr->data + expr->len; @@ -2025,6 +2036,9 @@ static ngx_int_t ngx_http_ssi_else(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, ngx_str_t **params) { + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "ssi else"); + if (ctx->output_chosen) { ctx->output = 0; } else { @@ -2041,6 +2055,9 @@ static ngx_int_t ngx_http_ssi_endif(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, ngx_str_t **params) { + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "ssi endif"); + ctx->output = 1; ctx->output_chosen = 0; ctx->conditional = 0; diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 487fd2684..6279f3465 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -738,9 +738,11 @@ ngx_http_update_location_config(ngx_http_request_t *r) clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); } - r->connection->log->file = clcf->err_log->file; - if (!(r->connection->log->log_level & NGX_LOG_DEBUG_CONNECTION)) { - r->connection->log->log_level = clcf->err_log->log_level; + if (r == r->main) { + r->connection->log->file = clcf->err_log->file; + if (!(r->connection->log->log_level & NGX_LOG_DEBUG_CONNECTION)) { + r->connection->log->log_level = clcf->err_log->log_level; + } } if ((ngx_io.flags & NGX_IO_SENDFILE) && clcf->sendfile) { diff --git a/src/http/ngx_http_postpone_filter_module.c b/src/http/ngx_http_postpone_filter_module.c index 76deaa4c8..b11774810 100644 --- a/src/http/ngx_http_postpone_filter_module.c +++ b/src/http/ngx_http_postpone_filter_module.c @@ -96,7 +96,8 @@ ngx_http_postpone_filter(ngx_http_request_t *r, ngx_chain_t *in) for (cl = pr->out; cl; cl = cl->next) { if (cl->buf == b) { ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, - "the same buf was used in postponed"); + "the same buf was used in postponed %p %p", + b, b->pos); ngx_debug_point(); return NGX_ERROR; } -- cgit v1.2.1