From 8184d1b3a72c31e7e6492fc189d687ce85548279 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 4 Mar 2005 14:06:57 +0000 Subject: nginx-0.1.24-RELEASE import *) Feature: the ngx_http_ssi_filter_module supports the QUERY_STRING and DOCUMENT_URI variables. *) Bugfix: the ngx_http_autoindex_module may some times return the 404 response for existent directory, if this directory was used in "alias" directive. *) Bugfix: the ngx_http_ssi_filter_module ran incorrectly for large responses. *) Bugfix: the lack of the "Referer" header line was always accounted as valid referrer. --- src/core/ngx_output_chain.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/core/ngx_output_chain.c') diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c index 557dd22c9..5f6970f80 100644 --- a/src/core/ngx_output_chain.c +++ b/src/core/ngx_output_chain.c @@ -20,12 +20,13 @@ static ngx_inline ngx_int_t ngx_output_chain_need_to_copy(ngx_output_chain_ctx_t *ctx, ngx_buf_t *buf); static ngx_int_t ngx_output_chain_add_copy(ngx_pool_t *pool, - ngx_chain_t **chain, ngx_chain_t *in); + ngx_chain_t **chain, ngx_chain_t *in); static ngx_int_t ngx_output_chain_copy_buf(ngx_buf_t *dst, ngx_buf_t *src, - ngx_uint_t sendfile); + ngx_uint_t sendfile); -ngx_int_t ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in) +ngx_int_t +ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in) { int rc, last; off_t bsize; @@ -62,9 +63,9 @@ ngx_int_t ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in) } } - last = NGX_NONE; out = NULL; last_out = &out; + last = NGX_NONE; for ( ;; ) { @@ -212,7 +213,7 @@ ngx_int_t ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in) static ngx_inline ngx_int_t - ngx_output_chain_need_to_copy(ngx_output_chain_ctx_t *ctx, ngx_buf_t *buf) +ngx_output_chain_need_to_copy(ngx_output_chain_ctx_t *ctx, ngx_buf_t *buf) { ngx_uint_t sendfile; @@ -251,8 +252,9 @@ static ngx_inline ngx_int_t } -static ngx_int_t ngx_output_chain_add_copy(ngx_pool_t *pool, - ngx_chain_t **chain, ngx_chain_t *in) +static ngx_int_t +ngx_output_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain, + ngx_chain_t *in) { ngx_chain_t *cl, **ll; #if (NGX_SENDFILE_LIMIT) @@ -316,8 +318,8 @@ static ngx_int_t ngx_output_chain_add_copy(ngx_pool_t *pool, } -static ngx_int_t ngx_output_chain_copy_buf(ngx_buf_t *dst, ngx_buf_t *src, - ngx_uint_t sendfile) +static ngx_int_t +ngx_output_chain_copy_buf(ngx_buf_t *dst, ngx_buf_t *src, ngx_uint_t sendfile) { off_t size; ssize_t n; @@ -408,14 +410,14 @@ static ngx_int_t ngx_output_chain_copy_buf(ngx_buf_t *dst, ngx_buf_t *src, } -ngx_int_t ngx_chain_writer(void *data, ngx_chain_t *in) +ngx_int_t +ngx_chain_writer(void *data, ngx_chain_t *in) { ngx_chain_writer_ctx_t *ctx = data; off_t size; ngx_chain_t *cl; - for (size = 0; in; in = in->next) { #if 1 @@ -444,7 +446,6 @@ ngx_int_t ngx_chain_writer(void *data, ngx_chain_t *in) for (cl = ctx->out; cl; cl = cl->next) { #if 1 - if (ngx_buf_size(cl->buf) == 0 && !ngx_buf_special(cl->buf)) { ngx_debug_point(); } -- cgit