bpo-26589: Add http status code 451 (GH-15413) · python/cpython@8f080b0 (original) (raw)
`@@ -15,6 +15,7 @@ class HTTPStatus(IntEnum):
`
15
15
` * RFC 7238: Permanent Redirect
`
16
16
` * RFC 2295: Transparent Content Negotiation in HTTP
`
17
17
` * RFC 2774: An HTTP Extension Framework
`
``
18
`+
- RFC 7725: An HTTP Status Code to Report Legal Obstacles
`
18
19
` * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2)
`
19
20
` """
`
20
21
`def new(cls, value, phrase, description=''):
`
`@@ -114,6 +115,10 @@ def new(cls, value, phrase, description=''):
`
114
115
`'Request Header Fields Too Large',
`
115
116
`'The server is unwilling to process the request because its header '
`
116
117
`'fields are too large')
`
``
118
`+
UNAVAILABLE_FOR_LEGAL_REASONS = (451,
`
``
119
`+
'Unavailable For Legal Reasons',
`
``
120
`+
'The server is denying access to the '
`
``
121
`+
'resource as a consequence of a legal demand')
`
117
122
``
118
123
`# server errors
`
119
124
`INTERNAL_SERVER_ERROR = (500, 'Internal Server Error',
`