[425] Expect:
ヘッダーは、
鯖の応答の送信に関するクライアントの期待を表明する要求ヘッダーです。
[420] Expect:
ヘッダーは、
当該要求を正しく処理するために鯖が対応する必要がある特定の動作の集合
(期待) を示すものです >>419。
[421] 値としては、 100-continue
のみが認められています >>419。
大文字・小文字不区別です >>419。
[10] 有効に活用されている例はほとんど見られません。
[422] 100-continue
については、そちらの項を参照してください。
[1] この欄は RFC 2616 ではじめて導入されました。
The Expect request-header field is used to indicate that particular server behaviors are required by the client.
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.
サーバーは要求中の Expect
欄の期待値のいずれかが理解できないか又は完了できないなら、
適当な誤り状態で応答しなければなりません。
サーバーは、期待のいずれかを満たすことができないなら
417
(期待失敗) 状態で応答しなければなりません。
要求にその他の問題があったなら、他の 4xx
状態で応答しなければなりません。
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.
この頭欄は将来の拡張のために拡張可能な構文で定義しています。
サーバーが対応していない expectation-extension
を含む Expect
欄を含む要求を受け取ったなら、
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.
期待値の比較は引用符で囲まれていない字句 (100-continue
字句を含む。) は大文字・小文字を区別せず、
quoted-string
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.
Expect
機構は hop‐by‐by です。
つまり、 HTTP/1.1 串はその満たすことのできない期待をもつ要求を受け取ったときには
417
(期待失敗) 状態を返さなければなりません。
しかし、 Expect
要求頭自体は末端対末端です。
要求が転送される時に転送されなければなりません。
Many older HTTP/1.0 and HTTP/1.1 applications do not understand the Expect header.
古い HTTP/1.0 応用や HTTP/1.1 応用の多くは Expect
頭を理解しません。
See section 8.2.3 for the use of the 100 (continue) status.
[424] RFC 2616 では 100
を求める機能と理解必須の拡張を示す一般的な仕組みとの2つの機能を
Expect:
が担っていましたが、
クライアントも鯖も拡張機能は実装していないどころか壊れている >>5
とされ、利用価値がないとして削除して簡略化されました >>419。
[2] 似た欄として RTSP (RFC 2326) の Require
, Proxy-Require
があります。 (HTTP と RTSP の WG が密に連絡取ってれば統一できたんじゃないかなあ。。。)
Upgrade
があります。Expect
, 現在のプロトコルの代わりに使うのが Upgrade
でしょうか。[7] Man:
ヘッダーもありますが、そちらは機能を直接指定するものではなく、名前空間により間接的に要求するものとなっています。
[6] 必須でなく希望を伝えるヘッダーとして、新たに
Prefer:
が追加されています。
[427] draft-goland-http-reliability-00 - SOA-Reliability (SOA-Rity) for HTTP ( ( 版)) <https://tools.ietf.org/html/draft-goland-http-reliability-00#appendix-A.7>
.NETにて簡単にHTTP接続するにはWebRequestを使う訳なのですが、これがデフォルトでは強制的に Expect: 100-continueを送るように固定されていて
417
を返すことは義務ではないようです。