aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/http/protocol_upgrade_mechanism/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/http/protocol_upgrade_mechanism/index.html')
-rw-r--r--files/zh-cn/web/http/protocol_upgrade_mechanism/index.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/files/zh-cn/web/http/protocol_upgrade_mechanism/index.html b/files/zh-cn/web/http/protocol_upgrade_mechanism/index.html
index 75ae2784b2..06b82c061b 100644
--- a/files/zh-cn/web/http/protocol_upgrade_mechanism/index.html
+++ b/files/zh-cn/web/http/protocol_upgrade_mechanism/index.html
@@ -7,7 +7,7 @@ translation_of: Web/HTTP/Protocol_upgrade_mechanism
<p><a href="/en/HTTP" title="en/HTTP">HTTP协议</a> 提供了一种特殊的机制,这一机制允许将一个已建立的连接升级成新的、不相容的协议。这篇指南涵盖了其工作原理和使用场景。</p>
-<p>通常来说这一机制总是由客户端发起的 (不过也有例外,比如说可以由服务端发起{{anch("Server-initiated upgrade to TLS", "升级到传输层安全协议(TLS)")}}), 服务端可以选择是否要升级到新协议。借助这一技术,连接可以以常用的协议启动(如HTTP/1.1),随后再升级到HTTP2甚至是WebSockets.</p>
+<p>通常来说这一机制总是由客户端发起的 (不过也有例外,比如说可以由服务端发起<a href="#server-initiated_upgrade_to_tls">升级到传输层安全协议(TLS)</a>), 服务端可以选择是否要升级到新协议。借助这一技术,连接可以以常用的协议启动(如HTTP/1.1),随后再升级到HTTP2甚至是WebSockets.</p>
<p>注意:HTTP/2 明确禁止使用此机制,这个机制只属于HTTP/1.1</p>
@@ -31,7 +31,7 @@ Host: www.example.com
Connection: upgrade
Upgrade: example/1, foo/2</pre>
-<p>根据之前的请求的协议,可能需要其他头部信息,例如:从HTTP/1.1升级到<a href="/en-US/docs/Web/API/WebSocket">WebSocket</a> 允许配置有关 WebSocket 连接的头部详细信息,以及在连接时提供一定程度的安全性。查看 {{anch("Upgrading to a WebSocket connection")}} 获取更多信息。</p>
+<p>根据之前的请求的协议,可能需要其他头部信息,例如:从HTTP/1.1升级到<a href="/en-US/docs/Web/API/WebSocket">WebSocket</a> 允许配置有关 WebSocket 连接的头部详细信息,以及在连接时提供一定程度的安全性。查看 <a href="#升级到websocket协议的连接">升级到WebSocket协议的连接</a> 获取更多信息。</p>
<p>如果服务器决定升级这次连接,就会返回一个 {{HTTPStatus(101, "101 Switching Protocols")}} 响应状态码,和一个要切换到的协议的头部字段Upgrade。 如果服务器没有(或者不能)升级这次连接,它会忽略客户端发送的 <code>"Upgrade</code> 头部字段,返回一个常规的响应:例如一个{{HTTPStatus(200, "200 OK")}}).</p>
@@ -204,7 +204,7 @@ Connection: Upgrade
and what to do if this text is seen ...
&lt;/html&gt;</pre>
-<p>If the client receiving the <code>"426 Upgrade Required"</code> response is willing and able to upgrade to TLS, it should then start the same process covered above under {{anch("Client-initiated upgrade to TLS")}}.</p>
+<p>If the client receiving the <code>"426 Upgrade Required"</code> response is willing and able to upgrade to TLS, it should then start the same process covered above under <a href="#client-initiated_upgrade_to_http_over_tls">Client-initiated upgrade to HTTP over TLS</a>.</p>
<h2 id="References">References</h2>