Mercurial > hg > nginx-vendor-0-7
diff src/http/ngx_http_copy_filter_module.c @ 132:91372f004adf NGINX_0_3_13
nginx 0.3.13
*) Feature: the IMAP/POP3 proxy supports STARTTLS and STLS.
*) Bugfix: the IMAP/POP3 proxy did not work with the select, poll, and
/dev/poll methods.
*) Bugfix: in SSI handling.
*) Bugfix: now Solaris sendfilev() is not used to transfer the client
request body to FastCGI-server via the unix domain socket.
*) Bugfix: the "auth_basic" directive did not disable the
authorization; bug appeared in 0.3.11.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 05 Dec 2005 00:00:00 +0300 |
parents | 644a7935144b |
children | fa32d59d9a15 |
line wrap: on
line diff
--- a/src/http/ngx_http_copy_filter_module.c +++ b/src/http/ngx_http_copy_filter_module.c @@ -70,11 +70,15 @@ static ngx_http_output_body_filter_pt static ngx_int_t ngx_http_copy_filter(ngx_http_request_t *r, ngx_chain_t *in) { + ngx_int_t rc; + ngx_connection_t *c; ngx_output_chain_ctx_t *ctx; ngx_http_copy_filter_conf_t *conf; - ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, - "copy filter: \"%V\"", &r->uri); + c = r->connection; + + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, + "copy filter: \"%V?%V\"", &r->uri, &r->args); ctx = ngx_http_get_module_ctx(r, ngx_http_copy_filter_module); @@ -88,7 +92,7 @@ ngx_http_copy_filter(ngx_http_request_t ngx_http_set_ctx(r, ctx, ngx_http_copy_filter_module); - ctx->sendfile = r->connection->sendfile; + ctx->sendfile = c->sendfile; ctx->need_in_memory = r->main_filter_need_in_memory || r->filter_need_in_memory; ctx->need_in_temp = r->filter_need_temporary; @@ -102,9 +106,16 @@ ngx_http_copy_filter(ngx_http_request_t } - /* the request pool may be already destroyed after ngx_output_chain()*/ + rc = ngx_output_chain(ctx, in); - return ngx_output_chain(ctx, in); +#if (NGX_DEBUG) + if (!c->destroyed) { + ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "copy filter: %i \"%V?%V\"", rc, &r->uri, &r->args); + } +#endif + + return rc; }