HTTP/2: response is not gzip-compressed

Tatsuhiko Kubo cubicdaiya at
Fri Aug 14 23:23:45 UTC 2015


I have been trying patch.http2-v2_1.9.3.txt.
A response does not seem to be gzip-compressed even though gzip
directive is enabled.

There is the configuration and how to reproduce below.

# output of 'nginx -V'

$ nginx -V
nginx version: nginx/1.9.3
built by clang 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
built with OpenSSL 1.0.2d 9 Jul 2015
TLS SNI support enabled
configure arguments: --sbin-path=/usr/sbin/nginx
--pid-path=/var/run/ --lock-path=/var/lock/nginx.lock
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-http_ssl_module
--with-http_v2_module --with-openssl=../openssl-1.0.2d

# nginx.conf

worker_processes auto;
events {
    worker_connections 1024;
http {
    gzip on;
    server {
        listen 443 ssl http2;
        ssl on;
        ssl_certificate /etc/nginx/ssl/server.crt;
        ssl_certificate_key /etc/nginx/ssl/server.key;
        root html;

# output of curl without '--http2'

$ curl -H "Accept-Encoding: gzip" --insecure -I
HTTP/1.1 200 OK
Server: nginx/1.9.3
Date: Fri, 14 Aug 2015 23:19:03 GMT
Content-Type: text/html
Last-Modified: Wed, 06 Aug 2014 17:07:04 GMT
Connection: keep-alive
ETag: W/"53e260b8-264"
Content-Encoding: gzip


# output of curl with '--http2'

$ curl --http2 -H "Accept-Encoding: gzip" --insecure -I
HTTP/2.0 200
date:Fri, 14 Aug 2015 23:07:50 GMT
last-modified:Wed, 06 Aug 2014 17:07:04 GMT



Tatsuhiko Kubo

More information about the nginx-devel mailing list