comparison src/http/ngx_http_postpone_filter_module.c @ 553:45033d85b30e release-0.2.5

nginx-0.2.5-RELEASE import *) Change: the duplicate value of the ngx_http_geo_module variable now causes the warning and changes old value. *) Feature: the ngx_http_ssi_module supports the "set" command. *) Feature: the ngx_http_ssi_module supports the "file" parameter in the "include" command. *) Feature: the ngx_http_ssi_module supports the variable value substitutions in expressions of the "if" command.
author Igor Sysoev <igor@sysoev.ru>
date Tue, 04 Oct 2005 10:38:53 +0000
parents b09ee85d0ac8
children 174f1e853e1e
comparison
equal deleted inserted replaced
552:b6f3197058d3 553:45033d85b30e
49 static ngx_int_t 49 static ngx_int_t
50 ngx_http_postpone_filter(ngx_http_request_t *r, ngx_chain_t *in) 50 ngx_http_postpone_filter(ngx_http_request_t *r, ngx_chain_t *in)
51 { 51 {
52 ngx_int_t rc; 52 ngx_int_t rc;
53 ngx_chain_t *out; 53 ngx_chain_t *out;
54 ngx_http_request_t *mr;
55 ngx_http_postponed_request_t *pr, **ppr; 54 ngx_http_postponed_request_t *pr, **ppr;
56 55
57 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 56 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
58 "http postpone filter \"%V\" %p", &r->uri, in); 57 "http postpone filter \"%V\" %p", &r->uri, in);
59 58
108 107
109 } else { 108 } else {
110 out = in; 109 out = in;
111 } 110 }
112 111
113 mr = r->main ? r->main : r; 112 if (out == NULL && r->main->out == NULL && !r->main->connection->buffered) {
114
115 if (out == NULL && mr->out == NULL && !mr->connection->buffered) {
116 return NGX_OK; 113 return NGX_OK;
117 } 114 }
118 115
119 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 116 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
120 "http postpone filter out \"%V\"", &r->uri); 117 "http postpone filter out \"%V\"", &r->uri);
121 118
122 rc = ngx_http_next_filter(mr, out); 119 rc = ngx_http_next_filter(r->main, out);
123 120
124 if (rc == NGX_ERROR) { 121 if (rc == NGX_ERROR) {
125 /* NGX_ERROR may be returned by any filter */ 122 /* NGX_ERROR may be returned by any filter */
126 r->connection->closed = 1; 123 r->connection->closed = 1;
127 } 124 }