[1] [[HTTP]] において[[メソッド]]や[[要求]]が[DFN[[RUBYB[[[安全]]]@en[safe]]]]であるとは、 [[副作用]]が無い (少なくても[[利用者]]は求めていない) ことを表します。 * 安全なメソッド - [3] [CODE(HTTP)@en[[[GET]]]] - [4] [CODE(HTTP)@en[[[HEAD]]]] * 歴史 [FIG[ [FIGCAPTION[ [2] RFC 2068・2616 (HTTP/1.1) 9.1 Safe and Idempotent Methods ]FIGCAPTION] * RFC 1945 (HTTP/1.0) 12.2; RFC 2068・2616 (HTTP/1.1) 9.1.1 Safe Methods > [DEL[[DEL[The writers of client software]] [INS[Implementers]]]] [INS[[INS[{2616}]] Implementors]] should be aware that the software represents the user in their interactions over the Internet, and should be careful to allow the user to be aware of any actions they [DEL[may]] [INS[might]] take which may have an unexpected significance to themselves or others. 実装者は、ソフトウェアがインターネット上の相互作用で利用者を表現することを意識し、 自身や他者に意図せぬ意味を持つかもしれない動作を取ろうとする時には利用者がそのことに気づけるように注意するべきです。 > In particular, the convention has been established that the GET and HEAD methods [DEL[should never]] [INS[SHOULD NOT]] have the significance of taking an action other than retrieval. These methods [DEL[should]] [INS[ought to]] be considered [DEL["safe."]] [INS["safe".]] This allows user agents to represent other methods, such as POST, [INS[[INS[{2068,2616}]] PUT and DELETE,]] in a special way, so that the user is made aware of the fact that a possibly unsafe action is being requested. 特に、 [CODE(HTTP)[[[GET]]]] 方式や [CODE(HTTP)[[[HEAD]]]] 方式が取り出し (retrieval) 以外の動作を取る意味を持つ'''べきではない'''という慣習が確立しています。 これらの方式は「安全」であると考えられるべきです。 これによって、利用者は他の方式、例えば [CODE(HTTP)[[[POST]]]] や [CODE(HTTP)[[[PUT]]]] や [CODE(HTTP)[[[DELETE]]]] を、特別な用途で表明することができ、 よって利用者に非安全かもしれない動作が要求されようとしていることを気づかせることができます。 > Naturally, it is not possible to ensure that the server does not generate side-effects as a result of performing a GET request; in fact, some dynamic resources consider that a feature. The important distinction here is that the user did not request the side-effects, so therefore cannot be held accountable for them. 当然、サーバーが [CODE(HTTP)[GET]] 要求を行うことで副作用を起こさないことを保証はできません。 実際、動的資源の中にはそれを機能としています。 ここでの重要な違いは、利用者は副作用を要求していないので、 従ってそれについての責任を負えないことです。 [INS[ 注: 注記のない変更点は、 RFC 2068→RFC 2616 での修正。 ]INS] * RFC 2068・2616 (HTTP/1.1) 9.1.2 Idempotent Methods →[CODE(WikiPage)[[[冪等]]]] * RFC の部分の License [[RFCのライセンス]] ]FIG} * 関連 [5] 類似した概念に[[冪等]]があります。