[7] [DFN[[CODE(HTTP)[[[102]]]]]] ([DFN[[[Processing]]]]) は、
処理の途中経過を表す[[状態符号]]です [SRC[>>1]]。

* 仕様書

[REFS[
- [1] [CITE@en[RFC 2518 - HTTP Extensions for Distributed Authoring -- WEBDAV]] ([TIME[2014-09-14 13:14:29 +09:00]] 版) <http://tools.ietf.org/html/rfc2518#section-10.1>
]REFS]

* 意味

[3] [CODE(HTTP)[[[102]]]] は、[[鯖]]が完全な[[要求]]を受け付けたものの、
処理をまだ完了していないことを[[クライアント]]に知らせる[[状態符号]]です [SRC[>>1]]。

[5] [CODE(HTTP)@en[[[Depth:]] [[infinity]]]] の場合など処理に時間がかかると、
[[クライアント]]はタイムアウトするかもしれません。[[鯖]]はこれを防ぐために
[CODE(HTTP)[[[102]]]] [[応答]]を送ることができます [SRC[>>1]]。

* 構文

[6] [CODE(HTTP)@en[[[Status-URI:]]]] [[ヘッダー]]で途中経過を送ることができます。

* 文脈

[4] この[[状態符号]]は、[[要求]]の完了まで著しく時間がかかると[[鯖]]が予期する場合にのみ送る[['''べきです''']]。
指針としては、20秒くらいより長くかかるなら、送る[['''べきです''']]。 [SRC[>>1]]

* 歴史

[FIG(quote)[
[FIGCAPTION[
[2] RFC 2518 (WebDAV) 10.1 102 Processing
]FIGCAPTION]

> The 102 (Processing) status code is an interim response used to
inform the client that the server has accepted the complete request,
but has not yet completed it.  This status code SHOULD only be sent
when the server has a reasonable expectation that the request will
take significant time to complete. As guidance, if a method is taking
longer than 20 seconds (a reasonable, but arbitrary value) to process
the server SHOULD return a 102 (Processing) response. The server MUST
send a final response after the request has been completed.

[CODE(HTTP)[102]] (処理中) 状態符号は、クライアントにサーバーが完全な要求を受け入れたがまだ完了していないことを知らせるのに使う暫定応答です。
この状態符号は、要求を完了させるのに十分な時間を必要とするとサーバーが適当に予期する場合のみ送信する'''べきです'''。
私信としては、 method が20秒 (適当だけど任意の値) 以上掛かるならサーバーは
[CODE(HTTP)[102]] (処理中) 応答を返す'''べきです'''。
サーバーは、要求が完了した後に最終応答を送信しなければ'''なりません'''。

> Methods can potentially take a long period of time to process,
especially methods that support the Depth header.  In such cases the
client may time-out the connection while waiting for a response.  To
prevent this the server may return a 102 (Processing) status code to
indicate to the client that the server is still processing the method.

各 method, とりわけ [CODE(HTTP)[[[Depth]]]] 頭に対応した method
では処理に長い時間が必要となる可能性があります。
そのような場合、クライアントは応答を待っている間に接続を時間切れとするかもしれません。
これを防ぐために、クライアントにサーバーがまだその method
の処理中であることを示す [CODE(HTTP)[102]] (処理中)
状態符号をサーバーが返しても構いません。
]FIG]

[10] [[RFC 4918]] は実装されていない [SRC[>>8]] として削除していますが、
[[IANA登録簿]]は引き続き [[RFC 2518]] を出典としています [SRC[>>9]]。

[REFS[
- [9] [CITE@en[RFC 4918 - HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)]] ([TIME[2014-09-21 17:04:59 +09:00]] 版) <http://tools.ietf.org/html/rfc4918#section-21.4>
- [8] [CITE@en[RFC 4918 - HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)]] ([TIME[2014-09-21 17:04:59 +09:00]] 版) <http://tools.ietf.org/html/rfc4918#appendix-F.3>
]REFS]