mirror of
https://github.com/nginx/nginx.git
synced 2025-07-29 17:26:15 +08:00
Merge of r4991: fixed proxied HEAD requests with gzip enabled.
Fixed HEAD requests handling when proxying is used (ticket #261).
This commit is contained in:
parent
eef05677eb
commit
6b070a4d21
@ -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);
|
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);
|
return ngx_http_next_body_filter(r, in);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3099,6 +3099,7 @@ ngx_http_upstream_finalize_request(ngx_http_request_t *r,
|
|||||||
r->connection->log->action = "sending to client";
|
r->connection->log->action = "sending to client";
|
||||||
|
|
||||||
if (rc == 0
|
if (rc == 0
|
||||||
|
&& !r->header_only
|
||||||
#if (NGX_HTTP_CACHE)
|
#if (NGX_HTTP_CACHE)
|
||||||
&& !r->cached
|
&& !r->cached
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user