#?SuikaWiki/0.9 page-icon="HTTP" * From specifications ** RFC 1945 (HTTP/1.0) 9.4; RFC 2068 & 2616 (HTTP/1.1) 10.4 Client Error 4xx > 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 応用により読んで解釈することが出来る前に消去してしまうかもしれません。 ** License [[RFCのライセンス]]