-
Notifications
You must be signed in to change notification settings - Fork 4
/
553.txt
100 lines (81 loc) · 4.56 KB
/
553.txt
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
* 仕様書
[REFS[
- [4] [CITE@en[RFC 2295 - Transparent Content Negotiation in HTTP]] ([TIME[2014-08-31 19:36:42 +09:00]] 版) <http://tools.ietf.org/html/rfc2295#page-8>
- [6] [CITE@en[RFC 2295 - Transparent Content Negotiation in HTTP]] ([TIME[2014-08-31 19:36:42 +09:00]] 版) <http://tools.ietf.org/html/rfc2295#section-8.5>
]REFS]
* 定義
[1]
> [INS[[[RFC2295]] 2.2 抜粋]]
:adhoc response:
An adhoc response can be sent by an origin server as an extreme
measure, to achieve compatibility with a non-negotiating or buggy
client if this compatibility cannot be achieved by sending a list
or choice response. There are very little requirements on the
contents of an adhoc response. Adhoc responses are defined in section 10.3.
[[起源サーバー]]は、[[目録応答]]や[[選択応答]]を送ることで[[折衝]]しない[[クライアント]]や蝕んだクライアントとの互換を達成できないときに、
この互換のために最後の手段として[DFN[臨時応答]]を送ることができます。
臨時応答の内容には非常にわずかの要件があります。
臨時応答は10.3節で定義します。
* 歴史
[FIG(quote)[
[FIGCAPTION[
[3] RFC 2295 (HTTP 透過内容折衝) 10.3 Adhoc response
]FIGCAPTION]
> An adhoc response can be sent by an origin server as an extreme
measure, to achieve compatibility with a non-negotiating or buggy
client if this compatibility cannot be achieved by sending a list or
choice response. There are very little requirements on the contents
of an adhoc response. An adhoc response MUST have a TCN header which
specifies the "adhoc" response-type, and a Vary header if the
response is cacheable. It MAY contain the Alternates header bound to
the negotiable resource.
臨時応答は非折衝クライアントや蝕んだクライアントとの互換性達成が[[目録応答]]や[[選択応答]]では不可能なときに最後の手段として[[起源サーバー]]が送ることが出来ます。
臨時応答の内容には非常にわずかの要件があります。
臨時応答は [CODE(HTTP)[[[adhoc]]]] [CODE(ABNF)[response-type]]
の [CODE(HTTP)[[[TCN]]]] 頭を持たなければ'''ならず'''、
応答が[[キャッシュ可能]]であれば [CODE(HTTP)[[[Vary]]]]
頭も持たなければ'''なりません'''。
臨時応答は折衝可能資源に束縛された [CODE(HTTP)[[[Alternates]]]]
頭を含んでも'''構いません'''。
> Any Vary header in the response SHOULD ensure correct handling by
plain HTTP/1.1 caching proxies. This header can either be
- Vary: *
> or a more elaborate header, see section 10.6.1. Depending on the
status code, an adhoc response is cacheable unless indicated otherwise.
> As an example of the use of an adhoc response, suppose that the
variant resource "redirect-to-blah" yields redirection (302)
responses. A choice response with this variant could look as follows:
[PRE[
HTTP/1.1 302 Moved Temporarily
Date: Tue, 11 Jun 1996 20:02:28 GMT
TCN: choice
Content-location: redirect-to-blah
Location: http://blah.org/
Content-Type: text/html
Content-Length: 62
This document is available <a href=http://blah.org/>here</a>.
]PRE]
> Suppose that the server knows that the receiving user agent has a
bug, which causes it to crash on responses which contain both a
Content-Location and a Location header. The server could then work
around this bug by performing a server-side override and sending the
following adhoc response instead:
受信する利用者エージェントに虫がいて応答に [CODE(HTTP)[[[Content-Location]]]]
頭と [CODE(HTTP)[[[Location]]]] 頭があると狂うとサーバーが知っているとします。
このサーバーは[[サーバー側上書き]]を行って代わりに次の臨時応答を送ることでこの虫を避けることができるでしょう。
>
[PRE[
HTTP/1.1 302 Moved Temporarily
Date: Tue, 11 Jun 1996 20:02:28 GMT
TCN: adhoc, keep
Location: http://blah.org/
Content-Type: text/html
Content-Length: 62
This document is available <a href=http://blah.org/>here</a>.
]PRE]
]FIG]
* 関連
[5] [[RFC 2295]] には他に[[リスト応答]]や[[選択応答]]があります。
* メモ
[2] [CODE[臨時応答]]と訳すのと[CODE[特別応答]]と訳すのと、どちらが適当かすごく迷うのですが・・・。
[CODE[Special]] との区別ができる方がましかなあと思って今のところ[CODE[臨時]]にしています。