bpo-26589: Add http status code 451#15413
Conversation
| 'Request Header Fields Too Large', | ||
| 'The server is unwilling to process the request because its header ' | ||
| 'fields are too large') | ||
| UNAVAILABLE_FOR_LEGAL_REASONS = (451, |
There was a problem hiding this comment.
Please add this constant to list of tested constants like the previously added constant MISDIRECTED_REQUEST : https://github.com/python/cpython/pull/2589/files#diff-4334c6b7e8fcfc88f2555f65fa7ab337R1358
| ``428`` ``PRECONDITION_REQUIRED`` Additional HTTP Status Codes :rfc:`6585` | ||
| ``429`` ``TOO_MANY_REQUESTS`` Additional HTTP Status Codes :rfc:`6585` | ||
| ``431`` ``REQUEST_HEADER_FIELDS_TOO_LARGE`` Additional HTTP Status Codes :rfc:`6585` | ||
| ``451`` ``UNAVAILABLE_FOR_LEGAL_REASONS`` Status Code to Report Legal Obstacles :rfc:`7725` |
There was a problem hiding this comment.
Perhaps you should change it to the title of the rfc for consistency?
| ``451`` ``UNAVAILABLE_FOR_LEGAL_REASONS`` Status Code to Report Legal Obstacles :rfc:`7725` | |
| ``451`` ``UNAVAILABLE_FOR_LEGAL_REASONS`` An HTTP Status Code to Report Legal Obstacles :rfc:`7725` |
| .. versionchanged:: 3.7 | ||
| Added ``421 MISDIRECTED_REQUEST`` status code. | ||
|
|
||
| .. versionadded:: 3.8 |
There was a problem hiding this comment.
Should this be:
| .. versionadded:: 3.8 | |
| .. versionadded:: 3.9 |
There was a problem hiding this comment.
I'm backporting this to 3.8
| * RFC 7238: Permanent Redirect | ||
| * RFC 2295: Transparent Content Negotiation in HTTP | ||
| * RFC 2774: An HTTP Extension Framework | ||
| * RFC 7725: Status Code to Report Legal Obstacles |
There was a problem hiding this comment.
| * RFC 7725: Status Code to Report Legal Obstacles | |
| * RFC 7725: An HTTP Status Code to Report Legal Obstacles |
|
Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
|
Sorry @rhettinger, I had trouble checking out the |
|
Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
|
GH-15436 is a backport of this pull request to the 3.8 branch. |
(cherry picked from commit 8f080b0) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Previously given LGTM by R David Murray on 5/29/2016
https://bugs.python.org/issue26589