Fix multipart file uploads without content type#5072
Merged
Conversation
5 tasks
Codecov Report
@@ Coverage Diff @@
## master #5072 +/- ##
=======================================
Coverage 97.65% 97.65%
=======================================
Files 43 43
Lines 8981 8983 +2
Branches 1411 1412 +1
=======================================
+ Hits 8770 8772 +2
Misses 98 98
Partials 113 113
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Member
Author
|
Thanks, @sjaensch ! |
aio-libs-github-bot bot
pushed a commit
that referenced
this pull request
Oct 18, 2020
* Fix multipart file uploads without content type * Fix mypy issue, add comment about multipart content type header * Fix line length issue, convert comment to docstring, do not escape line ending * Make presence of newlines in strings explicit, change back from docstring to comment * Fix tests * Reformat * Reformat Co-authored-by: Stephan Jaensch <[email protected]>
Contributor
💚 Backport successfulThe PR was backported to the following branches:
|
aio-libs-github-bot bot
added a commit
that referenced
this pull request
Oct 18, 2020
Backports the following commits to 3.7: - Fix multipart file uploads without content type (#5072) Co-authored-by: Andrew Svetlov <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What do these changes do?
Multipart form data with files without a content type were not treated correctly anymore by the aiohttp server.
Are there changes in behavior for the user?
This restores the behavior as it was up to aiohttp 3.5.4; for aiohttp 3.6.0 and aiohttp 3.6.1 it would treat such file uploads as normal fields, including trying to utf8-decode the data.
Fixed conflicts of #4090
Fixes #4089.