aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_upstream.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_upstream.c')
-rw-r--r--src/http/ngx_http_upstream.c36
1 files changed, 3 insertions, 33 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index c9cfcf835..4bf207ba1 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -147,11 +147,6 @@ static ngx_int_t ngx_http_upstream_rewrite_set_cookie(ngx_http_request_t *r,
static ngx_int_t ngx_http_upstream_copy_allow_ranges(ngx_http_request_t *r,
ngx_table_elt_t *h, ngx_uint_t offset);
-#if (NGX_HTTP_GZIP)
-static ngx_int_t ngx_http_upstream_copy_content_encoding(ngx_http_request_t *r,
- ngx_table_elt_t *h, ngx_uint_t offset);
-#endif
-
static ngx_int_t ngx_http_upstream_add_variables(ngx_conf_t *cf);
static ngx_int_t ngx_http_upstream_addr_variable(ngx_http_request_t *r,
ngx_http_variable_value_t *v, uintptr_t data);
@@ -316,12 +311,10 @@ static ngx_http_upstream_header_t ngx_http_upstream_headers_in[] = {
ngx_http_upstream_process_transfer_encoding, 0,
ngx_http_upstream_ignore_header_line, 0, 0 },
-#if (NGX_HTTP_GZIP)
{ ngx_string("Content-Encoding"),
- ngx_http_upstream_process_header_line,
- offsetof(ngx_http_upstream_headers_in_t, content_encoding),
- ngx_http_upstream_copy_content_encoding, 0, 0 },
-#endif
+ ngx_http_upstream_ignore_header_line, 0,
+ ngx_http_upstream_copy_header_line,
+ offsetof(ngx_http_headers_out_t, content_encoding), 0 },
{ ngx_null_string, NULL, 0, NULL, 0, 0 }
};
@@ -5349,29 +5342,6 @@ ngx_http_upstream_copy_allow_ranges(ngx_http_request_t *r,
}
-#if (NGX_HTTP_GZIP)
-
-static ngx_int_t
-ngx_http_upstream_copy_content_encoding(ngx_http_request_t *r,
- ngx_table_elt_t *h, ngx_uint_t offset)
-{
- ngx_table_elt_t *ho;
-
- ho = ngx_list_push(&r->headers_out.headers);
- if (ho == NULL) {
- return NGX_ERROR;
- }
-
- *ho = *h;
-
- r->headers_out.content_encoding = ho;
-
- return NGX_OK;
-}
-
-#endif
-
-
static ngx_int_t
ngx_http_upstream_add_variables(ngx_conf_t *cf)
{