-
-
Notifications
You must be signed in to change notification settings - Fork 951
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat (status_codes): update HTTP status constants wrt RFC 9110 (#2330)
* feat (status_codes) update HTTP status code constants wrt RFC 9110 refactor(response): replace falcon.HTTPPayloadTooLarge with falcon.HTTPContentTooLarge Replace the usage of falcon.HTTPPayloadTooLarge with falcon.HTTPContentTooLarge in the codebase. This change aligns with the recent renaming of the class in the Falcon library. The new class name better reflects the purpose of the error, which is to indicate that the content of the request is too large for the server to process. Closes #2322 * docs(_newsfragments) documented class name change from HTTPPayloadTooLarge to HTTPContentTooLarge * fix(status_codes): bring back removed constant for compatibility, fix ruff * chore: misc touchups * refactor: add a compat alias HTTPPayloadTooLarge ==> HTTPContentTooLarge * docs: tweaks newsfragment for HTTP status code updates --------- Co-authored-by: Vytautas Liuolia <[email protected]>
- Loading branch information
1 parent
f843b4f
commit 9b0f7da
Showing
12 changed files
with
56 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
The class ``falcon.HTTPPayloadTooLarge`` was renamed to | ||
:class:`falcon.HTTPContentTooLarge`, together with the accompanying HTTP | ||
:ref:`status code <status>` update, in order to reflect the newest HTTP | ||
semantics as per | ||
`RFC 9110, Section 15.5.14 <https://datatracker.ietf.org/doc/html/rfc9110#status.413>`__. | ||
(The old class name remains available as a deprecated compatibility alias.) | ||
|
||
In addition, one new :ref:`status code constant <status>` was added: | ||
``falcon.HTTP_421`` (also available as ``falcon.HTTP_MISDIRECTED_REQUEST``) | ||
in accordance with | ||
`RFC 9110, Section 15.5.20 <https://datatracker.ietf.org/doc/html/rfc9110#status.421>`__. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters