Search code examples
google-chromefirefoxnginxsafarihttp2

Chrome 51.0.2704.84 not requesting HTTP/2.0, but Safari an Firefox did


I has configed my nginx for a http2 service

    worker_processes 2;
    events {
        worker_connections 1024;
        multi_accept on;
        use epoll;
    }

http {
    sendfile on;

    server {
        listen 80;
        location / {
            return 301 https://$host$request_uri;
        }
    }

    server {
        listen 443 ssl http2;

        ssl_certificate     /usr/cer/server.cer;
        ssl_certificate_key /usr/cer/server.key;

        location / {
            root   /usr/share/nginx/html;
            index  index.html;
        }
    }
}

and with log message

  • Chrome 51.0.2704.84
  • Safari 9.1.1
  • Firefox 47.0


Solution

  • reason:

    To address this, Google developed a new transport layer named SPDY. SPDY was accessed over SSL/TLS, and Google developed an SSL/TLS modification called Next Protocol Negotiation (NPN) that allows clients to upgrade their SSL/TLS connections from HTTP/1 to HTTP/2. Major web servers (such as NGINX) implemented SPDY; OpenSSL and other SSL/TLS stacks implemented NPN.

    solution

    Recompile NGINX from source and use a private build with OpenSSL 1.0.2