diff options
author | Vitor Pereira <vmsousapereira@gmail.com> | 2017-10-26 18:49:19 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2017-10-26 18:49:19 (GMT) |
commit | 52ad72dd0a5a56414cc29b7c9b03259169825f35 (patch) | |
tree | e95aa7a4128b4cbb43fe3bc93e4e6e4915aba4d9 /Lib/http | |
parent | bdf4298ae2c1d720fd808520267ca3a4e56df842 (diff) | |
download | cpython-52ad72dd0a5a56414cc29b7c9b03259169825f35.zip cpython-52ad72dd0a5a56414cc29b7c9b03259169825f35.tar.gz cpython-52ad72dd0a5a56414cc29b7c9b03259169825f35.tar.bz2 |
bpo-30553: Add status code 421 to http.HTTPStatus (GH-2589)
Diffstat (limited to 'Lib/http')
-rw-r--r-- | Lib/http/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/http/__init__.py b/Lib/http/__init__.py index d4334cc..aed94a5 100644 --- a/Lib/http/__init__.py +++ b/Lib/http/__init__.py @@ -15,6 +15,7 @@ class HTTPStatus(IntEnum): * RFC 7238: Permanent Redirect * RFC 2295: Transparent Content Negotiation in HTTP * RFC 2774: An HTTP Extension Framework + * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) """ def __new__(cls, value, phrase, description=''): obj = int.__new__(cls, value) @@ -98,6 +99,8 @@ class HTTPStatus(IntEnum): 'Cannot satisfy request range') EXPECTATION_FAILED = (417, 'Expectation Failed', 'Expect condition could not be satisfied') + MISDIRECTED_REQUEST = (421, 'Misdirected Request', + 'Server is not able to produce a response') UNPROCESSABLE_ENTITY = 422, 'Unprocessable Entity' LOCKED = 423, 'Locked' FAILED_DEPENDENCY = 424, 'Failed Dependency' |