blob: 2da8fabe08371afa392896a896592ea865fc1712 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
---
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>{{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>
|