【发布时间】:2021-08-07 12:13:32
【问题描述】:
为什么 HTTP Upgrade: 标头在 Apache 中同时包含 h2 和 h2c?
我认为您只能运行 HTTP/2 明文变体 (h2c)。
为什么它还包括选项 h2?因为它只能从 TLS 访问,对吧?
编辑,最后一个问题:
通过 HTTP,Apache 会忽略升级到 h2 的请求,但它通常会宣传它。
Client (HTTP/1.1 without the upgrade header) => Apache (Sends Upgrade: h2, h2c)
Client (HTTP/1.1 with Upgrade: h2) => Apache (Ignores request to upgrade,
and responds back with HTTP/1.1)
通过 HTTP,Apache 尊重升级到 h2c,它通常会宣传它:)
Client (HTTP/1.1 without the upgrade header) => Apache (Sends Upgrade: h2, h2c)
Client (HTTP/1.1 with Upgrade: h2c) => Apache (Respects request, sends
101 Switching Protocols)
Apache (Uses HTTP/2 Cleartext)
通过 HTTPS,Apache 会忽略所有升级到 h2 和 h2c 的请求。 Apache 还通过 HTTPS 发送 h2c。这是为什么呢?
上述所有行为是否符合标准?
【问题讨论】:
标签: apache http-headers