About 102 Processing
Overview of 102 Processing
Indicating Processing StatusHTTP Status Code | ||
102 Processing Overview 102 Processing is an HTTP status code that indicates the client’s request has been accepted, and the server has started processing it but has not yet completed. This code is defined in the WebDAV protocol and is used to prevent client timeouts for long-running requests. |
||
Meaning The server is processing the request. (Completion may take some time.) |
When is 102 Processing Returned?
- When using the WebDAV protocol
- When the server receives a request requiring long processing time
- When it is necessary to notify the client of ongoing processing to avoid timeouts
Examples of 102 Processing
Long-Running Operations on Multiple Resources
DELETE /collection/ HTTP/1.1 Host: example.com
Response Example:
HTTP/1.1 102 Processing
Explanation: When a client sends a request to delete a large collection (e.g., an entire folder), the server may require considerable time to process. During this time, the 102 status code is returned to notify the client that processing is ongoing.
WebDAV Property Operations
PROPPATCH /collection/resource HTTP/1.1 Host: example.com
Response Example:
HTTP/1.1 102 Processing
Explanation: When a client sends a request to modify properties of a resource in bulk and the server begins processing but requires time to complete, a 102 response is returned.
Points to Note
Points to consider when returning 102 Processing:
- Return at the Appropriate Timing
Only return this status code when processing is ongoing and is expected to take significant time. - Prevent Client Timeouts
For long-running requests, proper use of the 102 status code can prevent client timeouts.
Comparison with Related HTTP Status Codes
Here’s an explanation of status codes related to 102 Processing:
- 200 OK: Used when the request is successfully processed, and results are returned immediately.
- 207 Multi-Status: Used in WebDAV when results for multiple resources are returned together.
Understanding these differences ensures the appropriate use of the 102 status code.