1. HTTP (Hypertext Transfer Protocol)

  1. HTTP Status Codes

  1. 101 Switching Protocols
    1. Writing responses (servers)
    2. Reading responses (clients)
    3. Overview table
    4. See also

101 Switching Protocols

The 101 Switching Protocols status code indicates the server has acknowledged the clients Upgrade request, and will switch protocols at the conclusion of the header block.

Despite being a 1xx intermediate status code, which normally signals there are more status codes to arrive for this response, this is the final status code that will be emitted on this connection before being converted to another protocol. The 200 status code is not used because that is the expected response if the server does not honor the Upgrade request-header.

Writing responses (servers)

This status code is used when handling requests with an Upgrade header, see that header page for more details.

Reading responses (clients)

101 Switching Protocols will only be sent by clients that requested it. If the client receives the status code without having sent an Upgrade header, this is a server error, and the client should close the connection and treat it the same as a 5xx error.

Overview table

Name
101
Message
101 Switching Protocols
Description
The server will change the protocol of the connection as requested.
Specification
RFC 7231: HTTP/1.1 Semantics and Content ยง6.2.2. 101 Switching Protocols

See also