-
-
Notifications
You must be signed in to change notification settings - Fork 947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(multipart): don't share MultipartParseOptions._DEFAULT_HANDLERS #2322
fix(multipart): don't share MultipartParseOptions._DEFAULT_HANDLERS #2322
Conversation
206eed7
to
bd3cfbb
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2322 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 63 63
Lines 7499 7502 +3
Branches 1275 1275
=========================================
+ Hits 7499 7502 +3 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this fix! 👍
Your initial version was not wrong per se, but it was not functioning correctly since the default UserDict.copy()
doesn't properly set up Handlers
internals. So I took the liberty of implementing a proper Handlers.copy()
method, now it seems to pass.
Now, only a Towncrier newsfragment is remaining before we can move this off Draft (barring one non-critical nitpick in the tests).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have now added the missing newsfragment.
* 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 <vytautas.liuolia@gmail.com>
Summary of Changes
Fix a problem, when MultipartParseOptions._DEFAULT_HANDLERS was shared between different instances
Related Issues
Fixes #2293.
Pull Request Checklist
docs/
.docs/
.versionadded
,versionchanged
, ordeprecated
directives.docs/_newsfragments/
, with the file name format{issue_number}.{fragment_type}.rst
. (Runtowncrier --draft
to ensure it renders correctly.)