diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2013-02-11 14:39:49 +0000 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2013-02-11 14:39:49 +0000 |
| commit | 6b070a4d216eb2083a96b3a3f24996f43940c4cd (patch) | |
| tree | 819c36b9e76b6112a5bfb48980f2d6a0871f3f58 | |
| parent | eef05677eb4a6b59ce0e9705aa66f0b796c08493 (diff) | |
| download | nginx-6b070a4d216eb2083a96b3a3f24996f43940c4cd.tar.gz nginx-6b070a4d216eb2083a96b3a3f24996f43940c4cd.tar.bz2 | |
Merge of r4991: fixed proxied HEAD requests with gzip enabled.
Fixed HEAD requests handling when proxying is used (ticket #261).
| -rw-r--r-- | src/http/modules/ngx_http_gzip_filter_module.c | 2 | ||||
| -rw-r--r-- | src/http/ngx_http_upstream.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c index 964f4fd27..f70987ee6 100644 --- a/src/http/modules/ngx_http_gzip_filter_module.c +++ b/src/http/modules/ngx_http_gzip_filter_module.c @@ -320,7 +320,7 @@ ngx_http_gzip_body_filter(ngx_http_request_t *r, ngx_chain_t *in) ctx = ngx_http_get_module_ctx(r, ngx_http_gzip_filter_module); - if (ctx == NULL || ctx->done) { + if (ctx == NULL || ctx->done || r->header_only) { return ngx_http_next_body_filter(r, in); } diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 5e04324d7..3436c6b1d 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -3099,6 +3099,7 @@ ngx_http_upstream_finalize_request(ngx_http_request_t *r, r->connection->log->action = "sending to client"; if (rc == 0 + && !r->header_only #if (NGX_HTTP_CACHE) && !r->cached #endif |
