Mercurial > hg > nginx
comparison src/http/modules/ngx_http_addition_filter_module.c @ 777:4ab852b691f5
<!--#include virtual=... set=... -->
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 13 Oct 2006 15:20:10 +0000 |
parents | 86bb73dc8d40 |
children | c2cae54f2045 |
comparison
equal
deleted
inserted
replaced
776:5622cdd48e5b | 777:4ab852b691f5 |
---|---|
142 | 142 |
143 if (!ctx->before_body_sent) { | 143 if (!ctx->before_body_sent) { |
144 ctx->before_body_sent = 1; | 144 ctx->before_body_sent = 1; |
145 | 145 |
146 if (conf->before_body.len) { | 146 if (conf->before_body.len) { |
147 if (ngx_http_subrequest(r, &conf->before_body, NULL, &sr, NULL, 0) | 147 rc = ngx_http_subrequest(r, &conf->before_body, NULL, &sr, NULL, 0); |
148 == NGX_ERROR) | 148 |
149 { | 149 if (rc == NGX_ERROR || rc == NGX_DONE) { |
150 return NGX_ERROR; | 150 return rc; |
151 } | 151 } |
152 } | 152 } |
153 } | 153 } |
154 | 154 |
155 last = 0; | 155 last = 0; |
166 | 166 |
167 if (rc == NGX_ERROR || !last || conf->after_body.len == 0) { | 167 if (rc == NGX_ERROR || !last || conf->after_body.len == 0) { |
168 return rc; | 168 return rc; |
169 } | 169 } |
170 | 170 |
171 if (ngx_http_subrequest(r, &conf->after_body, NULL, &sr, NULL, 0) | 171 rc = ngx_http_subrequest(r, &conf->after_body, NULL, &sr, NULL, 0); |
172 == NGX_ERROR) | 172 |
173 { | 173 if (rc == NGX_ERROR || rc == NGX_DONE) { |
174 return NGX_ERROR; | 174 return rc; |
175 } | 175 } |
176 | 176 |
177 ngx_http_set_ctx(r, NULL, ngx_http_addition_filter_module); | 177 ngx_http_set_ctx(r, NULL, ngx_http_addition_filter_module); |
178 | 178 |
179 return ngx_http_send_special(r, NGX_HTTP_LAST); | 179 return ngx_http_send_special(r, NGX_HTTP_LAST); |