mirror of
https://github.com/rmaake1/httpstatuses.git
synced 2024-10-06 08:07:21 +02:00
62df9e637c
* Add Python status constants * Add Python 2, Python 3+, Python 3.5+ status constants
27 lines
1.4 KiB
Markdown
27 lines
1.4 KiB
Markdown
---
|
|
set: 1
|
|
code: 101
|
|
title: Switching Protocols
|
|
references:
|
|
"Rails HTTP Status Symbol": ":switching_protocols"
|
|
"Go HTTP Status Constant": "http.StatusSwitchingProtocols"
|
|
"Symfony HTTP Status Constant": "Response::HTTP_SWITCHING_PROTOCOLS"
|
|
"Python2 HTTP Status Constant": "httplib.SWITCHING_PROTOCOLS"
|
|
"Python3+ HTTP Status Constant": "http.client.SWITCHING_PROTOCOLS"
|
|
"Python3.5+ HTTP Status Constant": "http.HTTPStatus.SWITCHING_PROTOCOLS"
|
|
---
|
|
|
|
The server understands and is willing to comply with the client's request, via the Upgrade header field<sup>[1](#ref-1)</sup>, 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.
|
|
|
|
---
|
|
|
|
* <span id="ref-1"><sup>1</sup> Upgrade [RFC7230 Section 6.7][2]</span>
|
|
* Source: [RFC7231 Section 6.2.2][1]
|
|
|
|
[1]: <http://tools.ietf.org/html/rfc7231#section-6.2.2>
|
|
[2]: <http://tools.ietf.org/html/rfc7230#section-6.7>
|