【问题标题】:How to check wether http2 is implemented and working on my website? [duplicate]如何检查 http 2 是否在我的网站上实施和工作? [复制]
【发布时间】:2019-06-19 21:41:59
【问题描述】:

我想检查我的网站上是否实现了 http/2。当我检查 https://tools.keycdn.com/ 时,它说 http2 已实现,但在 cmd 中键入 curl -I 给出了输出:

HTTP/1.1 200 OK
Date: Fri, 25 Jan 2019 17:02:45 GMT
Server: Apache
Pragma: no-cache
Cache-Control: max-age=0, must-revalidate, no-cache, no-store
Expires: Thu, 25 Jan 2018 17:02:47 GMT
X-Magento-Tags: FPC
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
...

http2 实现与否哪个正确?

【问题讨论】:

    标签: apache http2 http-1.1


    【解决方案1】:

    你确定 curl 是通过 HTTP2 请求的吗?

    尝试使用 --http2,来自 curl 网站上的 this page

    curl 提供 --http2 命令行选项以启用 HTTP/2。

    【讨论】:

    • 我刚刚在 cmd 中输入了它并返回: curl: (1) Unsupported protocol
    • 所以您使用的是不支持 HTTP/2 的旧版本 curl,因此它回退到 HTTP/1.1 以及为什么您会看到它与在线工具之间的差异。
    猜你喜欢
    • 2014-10-14
    • 2019-06-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-15
    • 1970-01-01
    相关资源
    最近更新 更多