Status Code 101 Switching Protocol
What is 101 Switching Protocol?
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.
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.
It is assumed that the server will only agree to switch protocols when it is advantageous to do so. For example, Status Code 101 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.
All HTTP response status codes are separated into five classes or categories. The first digit of the status code defines the class of response, while the last two digits do not have any classifying or categorization role. There are five classes defined by the standard:
- 1xx informational response – the request was received, continuing process
- 2xx successful – the request was successfully received, understood, and accepted
- 3xx redirection – further action needs to be taken in order to complete the request
- 4xx client error – the request contains bad syntax or cannot be fulfilled
- 5xx server error – the server failed to fulfil an apparently valid request
This switching protocol shall interact with the application in a transparent fashion, that is, the application cannot tell easily that it is running on the ISP rather than on one of the underlying protocols, even as the SP switches between protocols. The kinds of uses we envision include the following:
- Status Code 101 Performance. By using the best protocol for a particular network and application behavior, performance can always be optimal.
- On-line Upgrading. Protocol switching can be used to upgrade network protocols or fix minor bugs at run-time without having to restart applications.
- Status Code 101 Security. System managers will be able to increase security at run-time, for example when an intrusion detection system notices unusual behavior.