#?SuikaWiki/0.9 [[#comment]] * 仕様書から ** RFC 2616 (HTTP/1.1) 14.20 Expect >The Expect request-header field is used to indicate that particular server behaviors are required by the client. [CODE(HTTP)[Expect]] 要求頭欄は、クライアントが必要としている特定のサーバーの動作を示すのに使います。 > - Expect = "Expect" ":" 1#expectation > - expectation = "100-continue" | expectation-extension - expectation-extension = token [ "=" ( token | quoted-string ) *expect-params ] - expect-params = ";" token [ "=" ( token | quoted-string ) ] > A server that does not understand or is unable to comply with any of the expectation values in the Expect field of a request MUST respond with appropriate error status. The server MUST respond with a 417 (Expectation Failed) status if any of the expectations cannot be met or, if there are other problems with the request, some other 4xx status. サーバーは要求中の [CODE(HTTP)[Expect]] 欄の期待値のいずれかが理解できないか又は完了できないなら、 適当な誤り状態で応答しなければ'''なりません'''。 サーバーは、期待のいずれかを満たすことができないなら [CODE(HTTP)[[[417]]]] (期待失敗) 状態で応答しなければ'''なりません'''。 要求にその他の問題があったなら、他の [CODE(HTTP)[4[VAR[xx]]]] 状態で応答しなければ'''なりません'''。 >This header field is defined with extensible syntax to allow for future extensions. If a server receives a request containing an Expect field that includes an expectation-extension that it does not support, it MUST respond with a 417 (Expectation Failed) status. この頭欄は将来の拡張のために拡張可能な構文で定義しています。 サーバーが対応していない [CODE(ABNF)[expectation-extension]] を含む [CODE(HTTP)[Expect]] 欄を含む要求を受け取ったなら、 [CODE(HTTP)[417]] (期待失敗) 状態で応答しなければ'''なりません'''。 > Comparison of expectation values is case-insensitive for unquoted tokens (including the 100-continue token), and is case-sensitive for quoted-string expectation-extensions. 期待値の比較は引用符で囲まれていない字句 ([CODE(HTTP)[100-continue]] 字句を含む。) は大文字・小文字を区別せず、 [CODE(ABNF)[[[quoted-string]]]] [CODE(ABNF)[expectation-extensions]] は大文字・小文字を区別して行います。 > The Expect mechanism is hop-by-hop: that is, an HTTP/1.1 proxy MUST return a 417 (Expectation Failed) status if it receives a request with an expectation that it cannot meet. However, the Expect request-header itself is end-to-end; it MUST be forwarded if the request is forwarded. [CODE(HTTP)[Expect]] 機構は hop‐by‐by です。 つまり、 HTTP/1.1 串はその満たすことのできない期待をもつ要求を受け取ったときには [CODE(HTTP)[417]] (期待失敗) 状態を返さなければ'''なりません'''。 しかし、 [CODE(HTTP)[Expect]] 要求頭自体は末端対末端です。 要求が転送される時に転送されなければ'''なりません'''。 > Many older HTTP/1.0 and HTTP/1.1 applications do not understand the Expect header. 古い HTTP/1.0 応用や HTTP/1.1 応用の多くは [CODE(HTTP)[Expect]] 頭を理解しません。 > See section 8.2.3 for the use of the 100 (continue) status. ** RFC の部分の License [[RFCのライセンス]] * メモ - [1] この欄は [[RFC2616]] ではじめて導入されました。 - [2] 似た欄として [[RTSP]] ([[RFC2396]]) の [CODE(RTSP)[[[Require]]]], [CODE(RTSP)[[[Proxy-Require]]]] があります。 [WEAK[(HTTP と RTSP の WG が密に連絡取ってれば統一できたんじゃないかなあ。。。)]] - [3] HTTP/1.1 内にも似た欄として [CODE(HTTP)[[[Upgrade]]]] があります。