Opened 7 years ago

#1406 new defect

duplicated "content-encoding" while proxy server return a empty content-encoding header

Reported by: monstersb@… Owned by:
Priority: minor Milestone:
Component: nginx-core Version: 1.8.x
Keywords: Cc:
uname -a: all
nginx -V: nginx version: nginx/1.8.1
built by clang 7.3.0 (clang-703.0.29)
built with OpenSSL 1.0.2g 1 Mar 2016 (running with OpenSSL 1.0.2l 25 May 2017)
TLS SNI support enabled
configure arguments: --prefix=/usr/local/Cellar/nginx/1.8.1 --with-http_ssl_module --with-pcre --with-ipv6 --sbin-path=/usr/local/Cellar/nginx/1.8.1/bin/nginx --with-cc-opt='-I/usr/local/Cellar/pcre/8.38/include -I/usr/local/Cellar/openssl/1.0.2g/include' --with-ld-opt='-L/usr/local/Cellar/pcre/8.38/lib -L/usr/local/Cellar/openssl/1.0.2g/lib' --conf-path=/usr/local/etc/nginx/nginx.conf --pid-path=/usr/local/var/run/nginx.pid --lock-path=/usr/local/var/run/nginx.lock --http-client-body-temp-path=/usr/local/var/run/nginx/client_body_temp --http-proxy-temp-path=/usr/local/var/run/nginx/proxy_temp --http-fastcgi-temp-path=/usr/local/var/run/nginx/fastcgi_temp --http-uwsgi-temp-path=/usr/local/var/run/nginx/uwsgi_temp --http-scgi-temp-path=/usr/local/var/run/nginx/scgi_temp --http-log-path=/usr/local/var/log/nginx/access.log --error-log-path=/usr/local/var/log/nginx/error.log --with-http_gzip_static_module

Description

use nginx as a reverse proxy. when the source site returns

HTTP/1.1 200 OK
Host: 127.0.0.1:1234
Connection: close
X-Powered-By: PHP/5.6.30
Content-Encoding:
Content-type: text/html; charset=UTF-8

configure nginx to enable gzip, than returns

HTTP/1.1 200 OK
Server: nginx/1.8.1
Date: Fri, 27 Oct 2017 10:25:40 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Host: 127.0.0.1:1234
X-Powered-By: PHP/5.6.30
Content-Encoding:
Content-Encoding: gzip

Change History (0)

Note: See TracTickets for help on using tickets.