Overview

The server will switch to the protocol you asked for.

Takeaways

  1. The server understands and is willing to comply with the client's request, via the Upgrade header field, for a change in the application protocol being used on this connection.
  2. The server must generate an Upgrade header field in the response that indicates which protocol(s) will be switched to immediately after the empty line that terminates the 101 response.
  3. It is assumed that the server will only agree to switch protocols when it is advantageous to do so. For example, switching to a newer version of HTTP might be advantageous over older versions, and switching to a real-time, synchronous protocol might be advantageous when delivering resources that use such features.

Information

The HTTP 101 Switching Protocols response code indicates a protocol to which the server switches. The protocol is specified in the Upgrade request header received from a client.

The server includes in this response an Upgrade response header to indicate the protocol it switched to. The process is described in the Protocol upgrade mechanism article referenced below.

Related

Further Reading

Specification

101 Switching Protocols | The HTTP Working Group

101 Switching Protocols

MDN web docs

Upgrade header field

The HTTP Working Group

Upgrade header

MDN web docs

Protocol upgrade mechanism

MDN web docs