httpstatuses/contents/codes/101.md
WALL-E 62df9e637c Add Python status constants (#57)
* Add Python status constants

* Add Python 2, Python 3+, Python 3.5+ status constants
2016-05-22 00:07:16 +01:00

1.4 KiB

set code title references
1 101 Switching Protocols
Rails HTTP Status Symbol Go HTTP Status Constant Symfony HTTP Status Constant Python2 HTTP Status Constant Python3+ HTTP Status Constant Python3.5+ HTTP Status Constant
:switching_protocols http.StatusSwitchingProtocols Response::HTTP_SWITCHING_PROTOCOLS httplib.SWITCHING_PROTOCOLS http.client.SWITCHING_PROTOCOLS http.HTTPStatus.SWITCHING_PROTOCOLS

The server understands and is willing to comply with the client's request, via the Upgrade header field1, 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, 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.