Ensure that application/octet-stream is the default content_type#11580
Ensure that application/octet-stream is the default content_type#11580Dreamsorcerer merged 18 commits intoaio-libs:masterfrom
Conversation
The implementation of HeaderParser returns text/plain in case of issues as it's following mail based RFCs. This patch makes the application/octet-stream the default in all "wrong" cases.
CodSpeed Performance ReportMerging #11580 will not alter performanceComparing Summary
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #11580 +/- ##
==========================================
+ Coverage 98.72% 98.74% +0.01%
==========================================
Files 127 127
Lines 43449 43467 +18
Branches 2326 2327 +1
==========================================
+ Hits 42896 42922 +26
+ Misses 395 389 -6
+ Partials 158 156 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
The simplification makes sense with the way the class is used.
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Sam Bull <[email protected]>
Co-authored-by: Sam Bull <[email protected]>
To satisfy mypy
sep was not used
Backport to 3.13: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply d261f8a on top of patchback/backports/3.13/d261f8a3ceaeb9699c13d6f62be9ea875f6f40bc/pr-11580 Backporting merged PR #11580 into master
🤖 @patchback |
Backport to 3.14: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply d261f8a on top of patchback/backports/3.14/d261f8a3ceaeb9699c13d6f62be9ea875f6f40bc/pr-11580 Backporting merged PR #11580 into master
🤖 @patchback |
|
Thanks for that fix. If you could create the backports with the above instructions, that'd be great, otherwise I'll look at them later in the week. |
…-libs#11580) (cherry picked from commit d261f8a)
|
You're welcome ! Backport PR created :-) |
…] Ensure that application/octet-stream is the default content_type (#11660) **This is a backport of PR #11655 as merged into 3.14 (1e24afc).** (cherry picked from commit d261f8a) Co-authored-by: Samuel Gaist <[email protected]>
What do these changes do?
The implementation of HeaderParser returns text/plain in case of issues as it's following mail based RFCs.
This PR makes the application/octet-stream the default in all "wrong" cases.
Are there changes in behavior for the user?
Users will get
application/octet-streamin place ofplain/textIs it a substantial burden for the maintainers to support this?
The new code is based on the std library and should be of minimal impact.
Related issue number
Fixes #10889
Checklist
CONTRIBUTORS.txtCHANGES/foldername it
<issue_or_pr_num>.<type>.rst(e.g.588.bugfix.rst)if you don't have an issue number, change it to the pull request
number after creating the PR
.bugfix: A bug fix for something the maintainers deemed animproper undesired behavior that got corrected to match
pre-agreed expectations.
.feature: A new behavior, public APIs. That sort of stuff..deprecation: A declaration of future API removals and breakingchanges in behavior.
.breaking: When something public is removed in a breaking way.Could be deprecated in an earlier release.
.doc: Notable updates to the documentation structure or buildprocess.
.packaging: Notes for downstreams about unobvious side effectsand tooling. Changes in the test invocation considerations and
runtime assumptions.
.contrib: Stuff that affects the contributor experience. e.g.Running tests, building the docs, setting up the development
environment.
.misc: Changes that are hard to assign to any of the abovecategories.
Make sure to use full sentences with correct case and punctuation,
for example:
Use the past tense or the present tense a non-imperative mood,
referring to what's changed compared to the last released version
of this project.