Opened 5 years ago

Closed 5 years ago

#840 closed defect (duplicate)

HTTP2 over plaintext (port 80) returns a file download containing gibberish

Reported by: Andrew Sun Owned by:
Priority: major Milestone:
Component: nginx-core Version: 1.9.x
Keywords: http2 Cc:
uname -a: Linux 96ec8b679e2b 4.2.0-18-generic #22~14.04.1-Ubuntu SMP Fri Nov 6 22:20:11 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.9.7
built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)
built with OpenSSL 1.0.2d 9 Jul 2015
TLS SNI support enabled
configure arguments: --add-module=../ngx_pagespeed-1.9.32.10-beta --add-module=../ngx_cache_purge-2.3 --add-module=../headers-more-nginx-module-0.28 --with-pcre-jit --with-http_ssl_module --with-http_realip_module --with-ipv6 --with-http_stub_status_module --with-http_gzip_static_module --with-http_v2_module --with-openssl=../openssl-1.0.2d --with-cc-opt='-O3 -march=native' --with-ld-opt=-lrt

Description

The following configuration:

server {
        listen       80 http2 default_server deferred;
        server_name  localhost;

        error_page 404 /index.html;

        location / {
            return 404;
        }

        location = /index.html {
            gzip_static  on;
            root  /data/default;
        }

      
    }

returns a file download containing the following:

00000000   00 00 12 04  00 00 00 00  00 00 03 00  00 00 80 00  ................
00000010   04 7F FF FF  FF 00 05 00  FF FF FF 00  00 04 08 00  ................
00000020   00 00 00 00  7F FF 00 00  00 00 08 07  00 00 00 00  ................
00000030   00 00 00 00  00 00 00 00  01                        .........

However, the following configuration:

server {
        listen       80 default_server deferred;
        server_name  localhost;

        error_page 404 /index.html;

        location / {
            return 404;
        }

        location = /index.html {
            gzip_static  on;
            root  /data/default;
        }

      
    }

returns the file index.html as expected.

Change History (1)

comment:1 by Maxim Dounin, 5 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #808.

Note: See TracTickets for help on using tickets.