]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-102247: http: support rfc9110 status codes (GH-117611)
authorMichiel W. Beijen <mb@x14.nl>
Sat, 13 Apr 2024 14:33:20 +0000 (16:33 +0200)
committerGitHub <noreply@github.com>
Sat, 13 Apr 2024 14:33:20 +0000 (07:33 -0700)
commit022ba6d161138fbe02bcb83b7e667567f2673b0a
treee81d7a5dc60335b1cadca30463d5a4b7a14950f0
parentdd724239dd759879b9b6981114db25256449fc42
gh-102247: http: support rfc9110 status codes (GH-117611)

rfc9110 obsoletes the earlier rfc 7231. This document also includes some
status codes that were previously only used for WebDAV and assigns more
generic names to these status codes.

ref: https://www.rfc-editor.org/rfc/rfc9110.html#name-changes-from-rfc-7231

- http.HTTPStatus.CONTENT_TOO_LARGE (413, previously
  REQUEST_ENTITY_TOO_LARGE)
- http.HTTPStatus.URI_TOO_LONG (414, previously REQUEST_URI_TOO_LONG)
- http.HTTPStatus.RANGE_NOT_SATISFYABLE (416, previously
  REQUEST_RANGE_NOT_SATISFYABLE)
- http.HTTPStatus.UNPROCESSABLE_CONTENT (422, previously
  UNPROCESSABLE_ENTITY)

The new constants are added to http.HTTPStatus and the old constant names are
preserved for backwards compatibility.

References in documentation to the obsoleted rfc 7231 are updated
Doc/library/http.rst
Lib/http/__init__.py
Lib/test/test_httplib.py
Lib/test/test_httpservers.py
Lib/test/test_wsgiref.py
Misc/NEWS.d/next/Library/2024-04-07-19-39-20.gh-issue-102247.h8rqiX.rst [new file with mode: 0644]