Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Doc/library/http.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ Code Enum Name Details
``411`` ``LENGTH_REQUIRED`` HTTP/1.1 :rfc:`7231`, Section 6.5.10
``412`` ``PRECONDITION_FAILED`` HTTP/1.1 :rfc:`7232`, Section 4.2
``413`` ``REQUEST_ENTITY_TOO_LARGE`` HTTP/1.1 :rfc:`7231`, Section 6.5.11
``413`` ``PAYLOAD_TOO_LARGE`` HTTP/1.1 :rfc:`7231`, Section 6.5.11
``414`` ``REQUEST_URI_TOO_LONG`` HTTP/1.1 :rfc:`7231`, Section 6.5.12
``414`` ``URI_TOO_LONG`` HTTP/1.1 :rfc:`7231`, Section 6.5.12
``415`` ``UNSUPPORTED_MEDIA_TYPE`` HTTP/1.1 :rfc:`7231`, Section 6.5.13
``416`` ``REQUESTED_RANGE_NOT_SATISFIABLE`` HTTP/1.1 Range Requests :rfc:`7233`, Section 4.4
``417`` ``EXPECTATION_FAILED`` HTTP/1.1 :rfc:`7231`, Section 6.5.14
Expand Down
6 changes: 3 additions & 3 deletions Lib/http/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ def __new__(cls, value, phrase, description=''):
'Client must specify Content-Length')
PRECONDITION_FAILED = (412, 'Precondition Failed',
'Precondition in headers is false')
REQUEST_ENTITY_TOO_LARGE = (413, 'Request Entity Too Large',
'Entity is too large')
REQUEST_URI_TOO_LONG = (414, 'Request-URI Too Long',
PAYLOAD_TOO_LARGE = REQUEST_ENTITY_TOO_LARGE = (413,
'Request Entity Too Large', 'Entity is too large')
URI_TOO_LONG = REQUEST_URI_TOO_LONG = (414, 'Request-URI Too Long',
'URI is too long')
UNSUPPORTED_MEDIA_TYPE = (415, 'Unsupported Media Type',
'Entity body in unsupported format')
Expand Down
2 changes: 2 additions & 0 deletions Lib/test/test_httplib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,9 @@ def test_client_constants(self):
'LENGTH_REQUIRED',
'PRECONDITION_FAILED',
'REQUEST_ENTITY_TOO_LARGE',
'PAYLOAD_TOO_LARGE',
'REQUEST_URI_TOO_LONG',
'URI_TOO_LONG',
'UNSUPPORTED_MEDIA_TYPE',
'REQUESTED_RANGE_NOT_SATISFIABLE',
'EXPECTATION_FAILED',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add ``PAYLOAD_TOO_LARGE`` and ``URI_TOO_LONG`` to :class:`http.HTTPStatus`.