#?SuikaWiki/0.9
* 仕様書から
** 定義
[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節で定義します。
**RFC 2295 (HTTP 透過内容折衝) 10.3 Adhoc response
[3]
> 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 here.
]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 here.
]PRE]
** RFC の部分の License
[[RFCのライセンス]]
* メモ
[2] [CODE[臨時応答]]と訳すのと[CODE[特別応答]]と訳すのと、どちらが適当かすごく迷うのですが・・・。
[CODE[Special]] との区別ができる方がましかなあと思って今のところ[CODE[臨時]]にしています。