-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zh-cn]: update the translation of HTTP
510
status
- Loading branch information
1 parent
4d60e47
commit 28969a9
Showing
1 changed file
with
27 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,41 @@ | ||
--- | ||
title: 510 Not Extended | ||
slug: Web/HTTP/Status/510 | ||
l10n: | ||
sourceCommit: f584f1b27f9f3b78c95122c560f5135866a87eb0 | ||
--- | ||
|
||
{{HTTPSidebar}} | ||
|
||
HTTP 协议的 **`510 Not Extended`** 响应状态码在 HTTP 扩展框架协议(参见 [RFC 2774](https://tools.ietf.org/html/rfc2774))中发送。 | ||
HTTP **`510 Not Extended`** [服务端错误响应](/zh-CN/docs/Web/HTTP/Status#服务端错误响应)状态码在客户端请求声明了应使用 HTTP 扩展({{RFC("2774")}})来处理请求,但服务器不支持该扩展时发送。 | ||
|
||
在 HTTP 扩展框架协议中,一个客户端可以发送一个包含扩展声明的请求,该声明描述了要使用的扩展。如果服务器接收到这样的请求,但是请求不支持任何所描述的扩展,那么服务器将使用 510 状态码进行响应。 | ||
## 状态 | ||
|
||
## Status | ||
|
||
```plain | ||
```http | ||
510 Not Extended | ||
``` | ||
|
||
## Specifications | ||
## 示例 | ||
|
||
### 扩展不受支持 | ||
|
||
在以下示例中,客户端发送了一个请求,并在 `C-MAN` 标头中指定了强制扩展。{{HTTPHeader("Connection")}} 标头指定这些扩展应基于[逐跳(hop-by-hop)标头](/zh-CN/docs/Web/HTTP/Headers#逐跳(hop-by-hop)标头)进行处理。{{Glossary("Proxy_server", "代理")}}转发了扩展请求,但在传输过程中 {{HTTPHeader("Connection")}} 标头被移除。由于源服务器未收到有关 `M-GET` 方法的任何信息,因此它发送了 `510` 作为响应: | ||
|
||
```http | ||
M-GET /document HTTP/1.1 | ||
Host: example.com | ||
C-Man: "http://www.example.org/" | ||
Connection: C-Man | ||
``` | ||
|
||
```http | ||
HTTP/1.1 510 Not Extended | ||
``` | ||
|
||
## 规范 | ||
|
||
{{Specifications}} | ||
|
||
## 参见 | ||
|
||
- [HTTP 响应状态码](/zh-CN/docs/Web/HTTP/Status) |