#?SuikaWiki/0.9 page-icon="HTTP" [[#comment]] * 仕様書から ** RFC 1945 (HTTP/1.0); RFC 2068・2616 (HTTP/1.1) 10.2.5 204 No Content > The server has fulfilled the request but [DEL[[INS[{1945,2068}]] there is no new information to send back]] [INS[[INS[{2616}]] does not need to return an entity-body, and might want to return updated metainformation]]. [DEL[[INS[{1945,2068}]] If the client is a user agent, it [DEL[[INS[{1945}]] should not]] [INS[[INS[{2068}]] SHOULD NOT]] change its document view from that which caused the request to be [DEL[[INS[{1945}]] generated]] [INS[[INS[{2068}]] sent]]. This response is primarily intended to allow input for [DEL[[INS[{1945}]] scripts or other]] actions to take place without causing a change to the user agent's active document view.]] The response [DEL[[INS[{1945}]] may]] [INS[[INS[{2068}]] MAY]] include new [INS[[INS[{2616}]] or updated]] metainformation in the form of [DEL[[INS[{1945}]] entity headers]] [INS[[INS[{2068,2616}]] entity-headers]], which [DEL[[DEL[[INS[{1945}]] should]] [INS[[INS[{2068}]] SHOULD]] [INS[{1945,2068}]] apply to the document currently in the user agent's active view]] [INS[[INS[{2616}]] if present SHOULD be associated with the requested variant]]. サーバーは要求を満たしましたが、[DEL[送り返すあたらしい情報はありません]] [INS[[CODE(ABNF)[[[entity-body]]]] を返す必要はなく、更新されたメタ情報を返すことを望んでいるかもしれません]]。 応答は新規の[INS[又は更新された]]メタ情報を実体頭欄の形で含んでいても'''よく'''、[INS[示されている場合は要求した変種と関連付けられる'''べきです'''。]]。 [INS[ > [INS[{2616}]] If the client is a user agent, it SHOULD NOT change its document view from that which caused the request to be sent. This response is primarily intended to allow input for actions to take place without causing a change to the user agent's active document view, although any new or updated metainformation SHOULD be applied to the document currently in the user agent's active view. クライアントが利用者エージェントであれば、 要求を送ることとした文書表示を変更する'''べきではありません'''。 この応答は主として利用者エージェントの活性文書表示を変更することなく起こる動作の入力を可能とすることを意図しています。 但し、新規の又は更新されたメタ情報は、現在利用者エージェントで活性表示中の文書に適用する'''べきです'''。 ]INS] [INS[ > [INS[{206,2616}]] The 204 response MUST NOT include a message-body, and thus is always terminated by the first empty line after the header fields. [CODE(HTTP)[204]] 応答は [CODE(ABNF)[[[message-body]]]] を含んでは'''ならず'''、 従って常に頭欄の後の最初の空行で終端します。 ]INS] ** RFC の部分の License [[RFCのライセンス]] * メモ [1] 駄目駄目な UA は、 204 が返っても読み込み中のままになったりします。 また、例えばボタンの押下によって利用者が画面表示上の変化を期待していそうな場合なんかは、 表示に変化が起こらないとすると利用者が戸惑って何度も押してしまったりするかもしれません。 その辺、資源の著者や UA の作者の配慮でうまく問題を回避して欲しいです。。。 - [2] >>1 最低でも、 UA は読み込みを終了して、状態棒にサーバーが要求を受け入れましたみたいなメッセージを出して欲しいですね。