← Back to Chapters

102 Processing (WebDAV)

⏳ 102 Processing (WebDAV)

? Quick Overview

The 102 Processing status code is a WebDAV-specific informational HTTP response. It tells the client that the server has accepted the request and is still working on it, but no final response is available yet.

? Key Concepts

  • Belongs to the 1xx Informational status code range
  • Defined by the WebDAV extension to HTTP
  • Prevents client-side request timeouts
  • No response body is required

? Syntax / Theory

When a client sends a WebDAV request that may take a long time (such as copying large resources), the server can periodically respond with 102 Processing. This informs the client that the request is still being handled.

? Code Example(s)

? HTTP Response Structure
// Example HTTP response indicating the server is still processing
HTTP/1.1 102 Processing
// ...Connection stays open, final response comes later...
? Node.js Concept
// Node.js example sending a 102 Processing response
res.writeHead(102);

// IMPORTANT: Do NOT call res.end() yet!
// The connection must remain open for the final result.

performLongOperation(() => {
  // Send the final status only after work is done
  res.statusCode = 200;
  res.end("Operation Complete");
});

? Live Output / Explanation

What the Client Sees

The client does not receive the final result yet. Instead, it knows the request is still active and should wait.

? Interactive Example / Visual Flow

Request lifecycle when using 102 Processing. Click the button below to simulate a long file copy operation.

SERVER SIMULATOR
--:-- Ready to start...

? Use Cases

  • WebDAV file uploads and downloads
  • Large file copy or move operations
  • Resource locking and unlocking
  • Preventing client timeout during long tasks

? Tips & Best Practices

  • Use only for long-running operations
  • Do not send a response body with 102
  • Ensure a final response is eventually sent
  • Not widely used outside WebDAV contexts

? Try It Yourself

  • Simulate a delayed response using a server-side timeout
  • Send 102 first, then a final 200 response
  • Observe client behavior with and without 102