Mercurial > hg > nginx-vendor-0-8
diff src/core/ngx_output_chain.c @ 48:6cfc63e68377 NGINX_0_1_24
nginx 0.1.24
*) 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.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 04 Mar 2005 00:00:00 +0300 |
parents | da8c190bdaba |
children | 72eb30262aac |
line wrap: on
line diff
--- 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_ch } } - last = NGX_NONE; out = NULL; last_out = &out; + last = NGX_NONE; for ( ;; ) { @@ -212,7 +213,7 @@ ngx_int_t ngx_output_chain(ngx_output_ch 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_co } -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_b } -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, n 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(); }