HTTP Status Code 464 – Incompatible Protocol
The HTTP status code 464 Incompatible Protocol
is a non-standard status code used to indicate that a request was made using a protocol version that is not supported by the server. This status code is often used in environments where specific versions of protocols are required for communication, and the server is unable to process requests that do not adhere to these requirements.
Examples
Example 1: Incompatible HTTP Version
In this example, a client attempts to connect to a server using HTTP/2, but the server only supports HTTP/1.1. The server responds with a 464 status code to indicate the protocol incompatibility.
Client Request:
GET /api/data HTTP/2
Host: example.com
Server Response:
HTTP/1.1 464 Incompatible Protocol
Content-Type: text/plain
Content-Length: 45
Your request uses an unsupported protocol version.
Example 2: WebSocket Protocol Mismatch
In this scenario, a client tries to establish a WebSocket connection using an old protocol version. The server expects WebSocket version 13, but the client uses an outdated version. The server responds with a 464 status code to signal the mismatch.
Client Request:
GET /chat HTTP/1.1
Host: example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Version: 8
Server Response:
HTTP/1.1 464 Incompatible Protocol
Content-Type: text/plain
Content-Length: 59
Unsupported WebSocket version. Please use version 13 or newer.
Example 3 Scenario
# Client sends a request example. GET /example HTTP/1.1 Host: www.example.com # Server Response HTTP/1.1 464 464 Incompatible Protocol Date: Wed, 09 Oct 2024 23:08:54 GMT Server: ExampleServer/1.0 Content-Type: application/json { "error": "Description of the error for 464" }
Example 4 Scenario
# Client sends another example request. POST /another-example HTTP/1.1 Host: www.example.com # Server Response HTTP/1.1 464 464 Incompatible Protocol Date: Wed, 09 Oct 2024 23:08:54 GMT Server: ExampleServer/1.0 Content-Type: application/json { "error": "Detailed message for 464" }
Summary
The 464 Incompatible Protocol
status code is a non-standard response indicating that the server cannot process the request due to a protocol version mismatch. This status code is useful in environments where strict protocol adherence is necessary for security or compatibility reasons. By returning a 464 status code, servers can inform clients that they need to update their protocol version to communicate successfully.