[8] 412
(Precondition Failed) は、
条件付き要求の条件が満たされなかったことを示す状態符号です。
[6] 412
は、要求ヘッダーに指定された条件のいくつかを鯖で試験した結果偽だったことを示す状態符号です
>>5。
[7] なお、事前条件が満たされない場合必ず 412
が返されるわけではありません。
304
や 2xx
が返されることもありますし、
事前条件全体が無視される可能性もあります。詳しくは
If-Modified-Since:
, If-Unmodified-Since:
,
If-Match:
, If-None-Match:
,
If-Range:
の各項を参照してください。
[4] 起源鯖は、要求に If-Match:
や
If-None-Match:
が指定されていてその条件が満たされなかった場合、
特定の条件で 2xx
や 304
を返せる場合を除き、
412
応答を返さなければなりません >>3。
[18] If:
ヘッダーで指定された条件を満たさない時は、
412
応答を返さなければなりません >>17, >>25。
[23] LOCK
要求に If:
が指定された場合で対象資源がその範囲内にない場合には、
412
応答を返すことができます。
応答には事前条件符号 lock-token-matches-request-uri
を指定できます。 >>24
[16] Overwrite:
ヘッダーの指定により上書きできない時には、
412
応答を返さなければなりません >>15, >>17。
[10] SUBSCRIBE
要求が CALLBACK:
ヘッダーや NT:
ヘッダーの要件を満たさない時にも
412
応答が使われます >>9。
[12] UNSUBSCRIBE
要求が SID:
ヘッダーの要件を満たさない時にも
412
応答が使われます >>11。
[14] NOTIFY
要求がヘッダーの要件を満たさない時にも
412
応答が使われます >>13。
[19] WebDAV 鯖は要求が条件付きヘッダーを含まない時に
412
応答を返してはなりません >>17。
[21] COPY
要求 >>20 や
MOVE
要求 >>22
において Overwrite: F
により失敗した場合、 412
応答を返さなければなりません。
The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server. This response code allows the client to place preconditions on the current resource metainformation (header field data) and thus prevent the requested method from being applied to a resource other than the one intended.
1つ以上の要求頭欄で与えられた事前条件をサーバーで検査した時に偽と評価されました。 この応答符号によって、クライアントが現在の資源メタ情報 (頭欄データ) についての事前条件を配置することができ、従って要求した method が意図したものとは違った資源に適用されてしまうことを防げます。
[1] RFC 7252 - The Constrained Application Protocol (CoAP) ( ( 版)) <http://tools.ietf.org/html/rfc7252#section-5.9.2.8>
[413] Put Page ( ( 版)) <http://msdn.microsoft.com/ja-jp/library/azure/ee691975.aspx>
412 Precondition Failed
This API has been deprecated.
412: Precondition Failed
This means either the JMAP version specified in an X-JMAP-Version header, or an extension/version specified in an X-JMAP-Extensions header is not supported by the server. There is no content in the response.
412 item_version_mismatch The version of the item does not match.
412 item_already_present The item is already present.
412 Destination path already exists
[30] RFC 8144 - Use of the Prefer Header Field in Web Distributed Authoring and Versioning (WebDAV) () <https://tools.ietf.org/html/rfc8144#section-3.2>