aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/http/headers/accept-patch
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/http/headers/accept-patch
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/http/headers/accept-patch')
-rw-r--r--files/zh-cn/web/http/headers/accept-patch/index.html85
1 files changed, 85 insertions, 0 deletions
diff --git a/files/zh-cn/web/http/headers/accept-patch/index.html b/files/zh-cn/web/http/headers/accept-patch/index.html
new file mode 100644
index 0000000000..17f3fc0790
--- /dev/null
+++ b/files/zh-cn/web/http/headers/accept-patch/index.html
@@ -0,0 +1,85 @@
+---
+title: Accept-Patch
+slug: Web/HTTP/Headers/Accept-Patch
+translation_of: Web/HTTP/Headers/Accept-Patch
+---
+<div>{{HTTPSidebar}}</div>
+
+<p>服务器使用 HTTP 响应头 <code><strong>Accept-</strong></code><strong><code>Patch</code></strong> 通知浏览器请求的媒体类型(media-type)可以被服务器理解。</p>
+
+<p><strong><code>Accept-Patch</code></strong> in response to any method means that PATCH is allowed on the resource identified by the Request-URI. Two common cases lead to this:</p>
+
+<p>A server receiving a PATCH request with an unsupported media type could reply with  {{HTTPStatus("415")}} <code>Unsupported Media Type</code> and an Accept-Patch header referencing one or more supported media types.</p>
+
+<p> </p>
+
+<div class="note"><strong>Notes:</strong>
+
+<ul>
+ <li>
+ <p>An IANA registry maintains <a class="external" href="http://www.iana.org/assignments/http-parameters/http-parameters.xml#http-parameters-1">a complete list of official content encodings</a>.</p>
+ </li>
+ <li>Two others content encoding, <code>bzip</code> and <code>bzip2</code>, are sometimes used, though not standard. They implement the algorithm used by these two UNIX programs. Note that the first one was discontinued due to patent licensing problems.</li>
+</ul>
+</div>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row">头部类型</th>
+ <td>{{Glossary("Response header")}}</td>
+ </tr>
+ <tr>
+ <th scope="row">{{Glossary("Forbidden header name")}}(禁止修改的 HTTP 头)</th>
+ <td>yes</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox">Accept-Patch: application/example, text/example
+Accept-Patch: text/example;charset=utf-8
+Accept-Patch: application/merge-patch+json
+</pre>
+
+<h2 id="指令">指令</h2>
+
+<p>(无)</p>
+
+<h2 id="示例">示例</h2>
+
+<pre class="syntaxbox">Accept-Patch: application/example, text/example
+
+Accept-Patch: text/example;charset=utf-8
+
+Accept-Patch: application/merge-patch+json
+</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Title</th>
+ </tr>
+ <tr>
+ <td>{{RFC("5789", "Accept-Patch", "2.2")}}</td>
+ <td>HTTP PATCH</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p class="hidden">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.Accept-Patch")}}</p>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li>Http method {{HTTPMethod("PATCH")}}</li>
+ <li>HTTP Semantic and context {{RFC("7231", "PUT", "4.3.4")}}</li>
+</ul>