# HG changeset patch # User Maxim Dounin # Date 1360593589 0 # Node ID be9ce2946a8ee6e6d8954b25d20565d812a01a4c # Parent 004af18ddb86e1adc9a8131e3413a96ebbf95633 Merge of r4991: fixed proxied HEAD requests with gzip enabled. Fixed HEAD requests handling when proxying is used (ticket #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 @@ -320,7 +320,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