# HG changeset patch # User Valentin Bartenev # Date 1356370373 0 # Node ID e2794322ec766ec318fda16d50d8a2b2bd1e8691 # Parent eababa1dc446a028f37d9647aad9d229e6ea2723 Fixed HEAD requests handling when proxying is used (closes #261). diff --git a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c --- a/src/http/modules/ngx_http_gzip_filter_module.c +++ b/src/http/modules/ngx_http_gzip_filter_module.c @@ -321,7 +321,7 @@ ngx_http_gzip_body_filter(ngx_http_reque 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 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -3099,6 +3099,7 @@ ngx_http_upstream_finalize_request(ngx_h r->connection->log->action = "sending to client"; if (rc == 0 + && !r->header_only #if (NGX_HTTP_CACHE) && !r->cached #endif