423 Locked

423 Locked

The 423 HTTP status code means that the file or folder you are trying to access is currently locked and unavailable for editing or modification.

You can Check Your URLs HTTP Code for FREE

Introduction
In Action
Sample
Conclusion

Introduction

When you see the HTTP status code 423 Locked, it means that the file or folder you are trying to access is currently locked and unavailable for editing or modification.

This status is like trying to open a file that someone else is already working on, and you need to wait until it’s released or contact the owner to resolve the lock.

In Action

The 423 Locked error message is specific to WebDAV, a system that lets you work with files over HTTP. When you try to modify a file that is currently locked by another user, the server returns this error. If you are granted a lock on a resource, the server sends you a Lock-Token header, which you can later use to unlock or refresh the lock.

The response from the server also includes precondition or post-condition codes to help guide your next steps, such as indicating if a lock token has been submitted or if there are any conflicting locks.

Note: Search engines like Google will not index a URL with a 423 Locked response status, so URLs returning this code won’t appear in search results.

Sample

In the example, the client tries to upload a file to a folder that is currently locked, preventing any modifications. The server responds with a 423 Locked error message, indicating that the operation is not allowed. In the subsequent request, the client includes a Lock-Token in the If header to request unlocking the resource.

It’s important to note that a successful UNLOCK request only removes the specific lock referenced by the Lock-Token. If other locks are still active, they may cause the server to return the 423 Locked status again.

Initial request

PUT /documents/ HTTP/1.1
Host: www.example.com
Content-Type: applications/pdf
Content-Length: 10000

< PDF file transferred>

Initial response

HTTP/1.1 423 Locked
Content-Type: application/xml
Content-Length: 163

< ?xml version=”1.0″ encoding=”utf-8″ ?>
< d:error xmlns:d=”DAV:”>
< d:lock-token-submitted>
< d:href>/documents/</d:href>
< /d:lock-token-submitted>
< /d:error>

Second request, incorporating unlock request

PUT /documents/ HTTP/1.1
Host: www.example.com
Content-Type: applications/pdf
Content-Length: 10000
If: (<urn:uuid:123…789>)

< PDF file transferred>

Final response

HTTP/1.1 204 No Content

Conclusion

The 423 Locked status code indicates that the requested resource is currently locked and cannot be modified. Clients may attempt to unlock the resource using the Lock-Token in subsequent requests, but it’s important to remember that successful unlocking only applies to the specific lock referenced, and other locks may still be in place.

Related articles

999 Request Denied

999 Request Denied The 999 HTTP response status code is...

599 Network Connect Timeout Error

599 Network Connect Timeout Error The 599 HTTP response status...

598 Network read timeout error

598 Network read timeout error The 598 HTTP response status...

561 Unauthorized

561 Unauthorized The 561 HTTP response status code means there...

530 Site Frozen

530 Site Frozen The 530 HTTP response status code is...

999 Request Denied

0
999 Request Denied The 999 HTTP response status code is an unofficial catch-all error code returned...

599 Network Connect Timeout Error

0
599 Network Connect Timeout Error The 599 HTTP response status code indicates a timeout when trying...

598 Network read timeout error

0
598 Network read timeout error The 598 HTTP response status code indicates a timeout occurred during...

561 Unauthorized

0
561 Unauthorized The 561 HTTP response status code means there was an authentication failure. You can Check...

530 Site Frozen

0
530 Site Frozen The 530 HTTP response status code is a specialized server error used by...