diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/http/headers/via | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/http/headers/via')
-rw-r--r-- | files/zh-cn/web/http/headers/via/index.html | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/files/zh-cn/web/http/headers/via/index.html b/files/zh-cn/web/http/headers/via/index.html new file mode 100644 index 0000000000..8fc87f6919 --- /dev/null +++ b/files/zh-cn/web/http/headers/via/index.html @@ -0,0 +1,80 @@ +--- +title: Via +slug: Web/HTTP/Headers/Via +tags: + - 代理 + - 循环请求 + - 首部 +translation_of: Web/HTTP/Headers/Via +--- +<p>{{HTTPSidebar}}</p> + +<p><code><strong>Via</strong></code> 是一个通用首部,是由代理服务器添加的,适用于正向和反向代理,在请求和响应首部中均可出现。这个消息首部可以用来追踪消息转发情况,防止循环请求,以及识别在请求或响应传递链中消息发送者对于协议的支持能力。</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">Header type</th> + <td>{{Glossary("General header")}}</td> + </tr> + <tr> + <th scope="row">{{Glossary("Forbidden header name")}}</th> + <td>yes</td> + </tr> + </tbody> +</table> + +<h2 id="语法">语法</h2> + +<pre>Via: [ <protocol-name> "/" ] <protocol-version> <host> [ ":" <port> ] +or +Via: [ <protocol-name> "/" ] <protocol-version> <pseudonym> +</pre> + +<h2 id="指令">指令</h2> + +<dl> + <dt><protocol-name></dt> + <dd>可选。所使用的协议名称,如 "HTTP"。</dd> + <dt><protocol-version></dt> + <dd>所使用的协议版本号, 例如 "1.1"。</dd> + <dt><host> and <port></dt> + <dd>公共代理的URL及端口号。</dd> + <dt><pseudonym></dt> + <dd>内部代理的名称或别名。</dd> +</dl> + +<h2 id="示例">示例</h2> + +<pre>Via: 1.1 vegur +Via: HTTP/1.1 GWA +Via: 1.0 fred, 1.1 p.example.net +</pre> + +<h2 id="规范">规范</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Title</th> + </tr> + <tr> + <td>{{RFC("7230", "Via", "5.7.1")}}</td> + <td>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + +<p>The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> + +<p>{{Compat("http.headers.Via")}}</p> + +<h2 id="相关内容">相关内容</h2> + +<ul> + <li>{{HTTPHeader("X-Forwarded-For")}}</li> + <li><a href="https://github.com/heroku/vegur">Heroku 的代理库 Vegur</a></li> +</ul> |