-
Notifications
You must be signed in to change notification settings - Fork 4
/
877.txt
88 lines (74 loc) · 4.55 KB
/
877.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
[4] [DFN[[CODE(HTTP)[[[4[VAR[xx]]]]]]]] は、[[クライアント]]側の誤りを表す[[状態符号]]です。
[FIG(short list)[
- [CODE(HTTP)[[[400]]]]
- [CODE(HTTP)[[[401]]]]
- [CODE(HTTP)[[[402]]]]
- [CODE(HTTP)[[[403]]]]
- [CODE(HTTP)[[[404]]]]
- [CODE(HTTP)[[[405]]]]
- [CODE(HTTP)[[[406]]]]
- [CODE(HTTP)[[[407]]]]
- [CODE(HTTP)[[[408]]]]
- [CODE(HTTP)[[[409]]]]
- [CODE(HTTP)[[[410]]]]
- [CODE(HTTP)[[[411]]]]
- [CODE(HTTP)[[[412]]]]
- [CODE(HTTP)[[[413]]]]
- [CODE(HTTP)[[[414]]]]
- [CODE(HTTP)[[[415]]]]
- [CODE(HTTP)[[[416]]]]
- [CODE(HTTP)[[[417]]]]
- [CODE(HTTP)[[[418]]]]
- [CODE(HTTP)[[[419]]]]
- [CODE(HTTP)[[[420]]]]
- [CODE(HTTP)[[[421]]]]
- [CODE(HTTP)[[[422]]]]
- [CODE(HTTP)[[[423]]]]
- [CODE(HTTP)[[[424]]]]
- [CODE(HTTP)[[[425]]]]
- [CODE(HTTP)[[[426]]]]
- [CODE(HTTP)[[[427]]]]
- [CODE(HTTP)[[[428]]]]
- [CODE(HTTP)[[[429]]]]
- [CODE(HTTP)[[[430]]]]
- [CODE(HTTP)[[[431]]]]
]FIG]
* 仕様書
[REFS[
- [2] [CITE@en[RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content]] ([TIME[2014-08-07 05:54:02 +09:00]] 版) <https://tools.ietf.org/html/rfc7231#section-6.5>
]REFS]
* 構文
[5] [[鯖]]は、 [CODE(HTTP)@en[[[HEAD]]]] [[要求]]の場合を除き、
誤りの状況と、状況が一時的か永続的かを説明した[[表現]]を送信する[['''べきです''']]
[SRC[>>2]]。
* 処理モデル
[6] [[利用者エージェント]]は、含まれている[[表現]]を[[利用者]]に[[表示]]する[['''べきです''']]
[SRC[>>2]]。
* 歴史
[FIG(quote)[
[FIGCAPTION[
[3] RFC 1945 (HTTP/1.0) 9.4; RFC 2068 & 2616 (HTTP/1.1) 10.4 Client Error 4xx
]FIGCAPTION]
> The 4xx class of status code is intended for cases in which the client seems to have erred. [DEL[[INS[{1945}]] If the client has not completed the request when a 4xx code is received, it should immediately cease sending data to the server.]]
Except when responding to a HEAD request, the server [DEL[[INS[{1945}]] should]] [INS[[INS[{2068}]] SHOULD]]
include an entity containing an explanation of the
error situation, and whether it is a temporary or permanent
condition. These status codes are applicable to any request method. [INS[[INS[{2068}]] User agents SHOULD display any included entity to the user.]]
[CODE(HTTP)[4[VAR[xx]]]] 級の状態符号は、クライアントが誤っていると思われる場合に使うことを意図しています。 [DEL[クライアントが [CODE(HTTP)[4[VAR[xx]]]] 符号を受信した時に要求が完了していなければ、クライアントは即座にサーバーへのデータの送信を止めるべきです。]]
[CODE(HTTP)[[[HEAD]]]] 要求に対する応答の場合を除き、サーバーは誤り状況の説明と、
一時的条件なのか永続的条件なのかを含んだ実体を含める'''べきです'''。
これらの状態符号はどの要求 method についても適用できます。 [INS[ル容赦エージェントは含まれている実体を利用者に表示する'''べきです'''。]]
> [DEL[[INS[{1945,2068}]] Note:]] If the client is sending data, [INS[[INS[{2068}]] a]] server implementation[DEL[s]] [DEL[[INS[{1945}]] on]] [INS[[INS[{2068}]] using]]
TCP [DEL[[INS[{1945,2068}]] should]] [INS[[INS[{2616}]] SHOULD]] be careful to ensure that the client acknowledges receipt of the packet(s) containing the response[INS[,]] [DEL[[INS[{1945}]] prior to closing]] [INS[[INS[{2068}]] before the server closes]]
the input connection. If the client continues sending data to the server after the close, the server's [DEL[[INS[{1945}]] controller]] [INS[[INS[{2068}]] TCP stack]]
will send a reset packet to the client, which may erase the client's unacknowledged
input buffers before they can be read and interpreted by the HTTP application.
クライアントがデータを送信している時、 TCP
を使っているサーバー実装は、サーバーが入力接続を閉じる前にクライアントが応答を含んでいるパケットの受信に確実に肯定応答するよう注意する'''べきです'''。
閉じた後もクライアントがサーバーにデータを送り続けるなら、
サーバーの TCP スタックはクライアントに[RUBY[再設定] [リセット]]パケットを送信することとなり、
クライアントの否定応答入力バッファを HTTP 応用により読んで解釈することが出来る前に消去してしまうかもしれません。
]FIG]
[1] [CITE[Extended HTTP Error Codes]]
( ([TIME[2009-03-01 03:42:47 +09:00]] 版))
<http://www.gumbyware.com/~eric/http-errors.html>