summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-11-16 13:22:10 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-11-16 13:22:10 +0000
commit50a94dfbd1427951f3922329d432029094660dc6 (patch)
tree0ec53610f99630f64d887ff325554c8a1986f1ad
parenta4a054130809c5e37f4fb48cb2cdd66b4237e577 (diff)
downloadnginx-50a94dfbd1427951f3922329d432029094660dc6.tar.gz
nginx-50a94dfbd1427951f3922329d432029094660dc6.tar.bz2
backout r3325: postpone filter is a body only filter
-rw-r--r--src/http/modules/ngx_http_chunked_filter_module.c1
-rw-r--r--src/http/modules/ngx_http_range_filter_module.c1
-rw-r--r--src/http/ngx_http_header_filter_module.c4
3 files changed, 6 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_chunked_filter_module.c b/src/http/modules/ngx_http_chunked_filter_module.c
index c3864bb4e..846053ff4 100644
--- a/src/http/modules/ngx_http_chunked_filter_module.c
+++ b/src/http/modules/ngx_http_chunked_filter_module.c
@@ -53,6 +53,7 @@ ngx_http_chunked_header_filter(ngx_http_request_t *r)
if (r->headers_out.status == NGX_HTTP_NOT_MODIFIED
|| r->headers_out.status == NGX_HTTP_NO_CONTENT
|| r->headers_out.status == NGX_HTTP_CREATED
+ || r != r->main
|| (r->method & NGX_HTTP_HEAD))
{
return ngx_http_next_header_filter(r);
diff --git a/src/http/modules/ngx_http_range_filter_module.c b/src/http/modules/ngx_http_range_filter_module.c
index 3d9a38e89..bc2840831 100644
--- a/src/http/modules/ngx_http_range_filter_module.c
+++ b/src/http/modules/ngx_http_range_filter_module.c
@@ -151,6 +151,7 @@ ngx_http_range_header_filter(ngx_http_request_t *r)
if (r->http_version < NGX_HTTP_VERSION_10
|| r->headers_out.status != NGX_HTTP_OK
+ || r != r->main
|| r->headers_out.content_length_n == -1
|| !r->allow_ranges)
{
diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c
index 6af0a8ad1..0f6f1731a 100644
--- a/src/http/ngx_http_header_filter_module.c
+++ b/src/http/ngx_http_header_filter_module.c
@@ -176,6 +176,10 @@ ngx_http_header_filter(ngx_http_request_t *r)
r->header_sent = 1;
+ if (r != r->main) {
+ return NGX_OK;
+ }
+
if (r->http_version < NGX_HTTP_VERSION_10) {
return NGX_OK;
}