423 Locked
WebDAV code meaning the target resource is locked and the request cannot proceed without the lock token.
Status
HTTP/1.1 423 Locked
Details
- Category: 4xx
- Status: Standard. Registered with IANA and defined by a current standards-track RFC.
- Specification: RFC 4918 §11.3
- Cacheable: Not cacheable
- Response body: Allowed
- Retry: Retry after a delay
WebDAV locking prevents two clients from editing the same document at once. A client takes a lock, receives a lock token, and includes that token in an If header on subsequent writes. Anyone writing without the token gets 423.
Outside WebDAV, some applications reuse 423 to mean an account or record is locked, for example after too many failed sign-in attempts. That is a convention rather than a specified meaning, so read the body.
Headers
- If: Request header carrying the lock token that authorizes the write.
Common causes
- Another client holds a WebDAV lock on the resource or its parent collection.
- A stale lock left behind by a client that disconnected without releasing it.
- An application-level lock on an account or record.
How to fix it
As the client
- Include the lock token in an If header, or wait for the lock to expire.
- Discover the lock owner and timeout with PROPFIND on DAV:lockdiscovery.
As the server
- Set finite lock timeouts so abandoned locks release themselves.
- Report the lock owner and expiry in the error body so clients can act.
Examples
PUT /dav/shared/spec.docx HTTP/1.1 Host: files.example.com HTTP/1.1 423 Locked Content-Type: application/xml; charset=utf-8 <D:error xmlns:D="DAV:"><D:lock-token-submitted/></D:error>