Skip to content

HTTP Status Code 460 – Client Closed Connection Prematurely

HTTP Status Code 460 – Client Closed Connection Prematurely

The HTTP status code 460 is a non-standard status code used to indicate that a client has closed the connection before the server could produce a response. This code is not part of the official HTTP/1.1 specification, but it is sometimes used in practice, particularly in certain web server implementations or proxies, to signal that the request was not fully processed because the client disconnected abruptly.

Example 1: File Upload Interrupted

Consider a scenario where a client is uploading a large file to the server. If the client loses network connectivity or closes the browser tab during the upload, the server may log or respond with a status code 460 to indicate that the connection was closed unexpectedly.


POST /upload HTTP/1.1
Host: example.com
Content-Type: multipart/form-data; boundary=---WebKitFormBoundary
Content-Length: 104857600

—WebKitFormBoundary
Content-Disposition: form-data; name=”file”; filename=”largefile.zip”
Content-Type: application/zip

[Binary data…]

In this case, if the connection drops mid-transfer, the server might generate a 460 status code to signify the interruption.

Example 2: Client Timeout

Another example could be when the client sends a request but doesn’t wait for the server’s response due to a custom timeout setting. This can occur when a client-side script sets a very short timeout for a request and aborts it before the server has a chance to respond.


const xhr = new XMLHttpRequest();
xhr.open('GET', 'https://example.com/api/data', true);
xhr.timeout = 100; // Set timeout to 100ms
xhr.ontimeout = function () {
console.log('Request timed out');
};
xhr.send();

Here, if the server takes longer than 100ms to respond, the client will terminate the connection, and the server may log this as a 460 error.

Example Three Scenario

# Client sends a request example.
GET /example HTTP/1.1
Host: www.example.com

# Server Response
HTTP/1.1 460 460 Client Closed Connection Prematurely
Date: Wed, 09 Oct 2024 23:08:39 GMT
Server: ExampleServer/1.0
Content-Type: application/json

{
    "error": "Description of the error for 460"
}

Example 4 Situation

# Client sends another example request.
POST /another-example HTTP/1.1
Host: www.example.com

# Server Response
HTTP/1.1 460 460 Client Closed Connection Prematurely
Date: Wed, 09 Oct 2024 23:08:39 GMT
Server: ExampleServer/1.0
Content-Type: application/json

{
    "error": "Detailed message for 460"
}

Summary

The HTTP status code 460, although not officially standardized, serves a useful purpose in certain architectures by providing information about client-side interruptions. It is particularly helpful in diagnosing issues related to network reliability, client configuration, or user behavior, where the client prematurely closes a connection before the server can complete processing the request. Implementations of this status code are typically found in server or proxy logs rather than being returned directly to the client.

I am the founder of SEO Leaders and have been involved in the internet and web development in one way or another for over 20 years. Since founding SEO Leaders some 6 years ago I have been heavily involved in web develepment, Digital PR and technical SEO for a wide variety of projects. I hope to enlighten you on a wide range of topics related to my chosen profession!

Back To Top