当禁用 mod_gnutls 时:
Firefox 显示:版本: http/2.0
响应头:
Content-Encoding: gzip
Content-Length: 118
Content-Type: text/html; charset=UTF-8
Date: Wed, 10 Aug 2016 02:13:43 GMT
Server: Apache/2.4.23 (Unix) OpenSSL/1.0.2h PHP/5.6.24
Vary: Accept-Encoding
X-Firefox-Spdy: h2
X-Powered-By: PHP/5.6.24
测试:
nghttp -v
https://domain.org输出:
[ 0.098] Connected
The negotiated protocol: h2
...
当启用 mod_gnutls 时:
Firefox 显示:版本: http/1.1
响应头:
Connection: Upgrade, Keep-Alive
Content-Encoding: gzip
Content-Length: 118
Content-Type: text/html; charset=UTF-8
Date: Wed, 10 Aug 2016 02:30:22 GMT
Keep-Alive: timeout=5, max=100
Server: Apache/2.4.23 (Unix) OpenSSL/1.0.2h PHP/5.6.24 mod_gnutls/0.7.5 GnuTLS/3.5.2
Upgrade: h2
Vary: Accept-Encoding
X-Powered-By: PHP/5.6.24
测试:
nghttp -v
https://domain.org输出:
[ 0.240] Connected
The negotiated protocol: http/1.1
[ERROR] HTTP/2 protocol was not selected. (nghttp2 expects h2)
Some requests were not processed. total=1, processed=0
怎样才能在使用 mod_gnutls 的情况下也能支持 HTTP/2 。