From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/http/headers/expect/index.html | 96 +++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 files/ja/web/http/headers/expect/index.html (limited to 'files/ja/web/http/headers/expect/index.html') diff --git a/files/ja/web/http/headers/expect/index.html b/files/ja/web/http/headers/expect/index.html new file mode 100644 index 0000000000..41a2144feb --- /dev/null +++ b/files/ja/web/http/headers/expect/index.html @@ -0,0 +1,96 @@ +--- +title: Expect +slug: Web/HTTP/Headers/Expect +tags: + - HTTP + - HTTP ヘッダー + - Reference + - リクエストヘッダー +translation_of: Web/HTTP/Headers/Expect +--- +
{{HTTPSidebar}}
+ +

HTTP の Expect リクエストヘッダーは、リクエストを正しく扱うためにサーバーが実行する必要があると期待されていることを示します。

+ +

仕様書で定義されている期待は Expect: 100-continue だけで、サーバーが応答するべきことは以下の通りです。

+ + + +

例えば、サーバーは {{HTTPHeader("Content-Length")}} が長すぎるとリクエストを拒否する可能性があります。

+ +

Expect ヘッダーを送信するブラウザーはあまりありませんが、 cURL のような一部の他のクライアントは既定で送信します。

+ + + + + + + + + + + + +
ヘッダー種別{{Glossary("Request header", "リクエストヘッダー")}}
{{Glossary("Forbidden header name", "禁止ヘッダー名")}}はい
+ +

構文

+ +

現在は "100-continue" 以外の期待は定義されていません。

+ +
Expect: 100-continue
+
+ +

ディレクティブ

+ +
+
100-continue
+
クライアントがこの要求で (おそらく大規模な) メッセージ本文を送信しようとしていることを受信者に通知し、 {{HTTPStatus("100")}} (Continue) 暫定応答を受信することを期待します。
+
+ +

+ +

巨大なメッセージ本文

+ +

クライアントは Expect ヘッダーで要求を送信し、メッセージ本文を送信する前にサーバーが応答するのを待ちます。

+ +
PUT /somewhere/fun HTTP/1.1
+Host: origin.example.com
+Content-Type: video/h264
+Content-Length: 1234567890987
+Expect: 100-continue
+
+ +

サーバーはリクエストヘッダーをチェックし、 {{HTTPStatus("100")}} (Continue) 応答を返信して、クライアントにメッセージ本体を送信するよう指示するか、又は期待に沿わない場合は、 {{HTTPStatus("417")}} (Expectation Failed) 状態になります。

+ +

仕様書

+ + + + + + + + + + + + + + +
仕様書題名
{{RFC("7231", "Expect", "5.1.1")}}Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
+ +

ブラウザーの対応

+ + + +

{{Compat("http.headers.Expect")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf