Skip to content

Ensure zero byte files can be sent#5125

Merged
asvetlov merged 1 commit intoaio-libs:masterfrom
bdraco:handle_zero_byte_files
Oct 25, 2020
Merged

Ensure zero byte files can be sent#5125
asvetlov merged 1 commit intoaio-libs:masterfrom
bdraco:handle_zero_byte_files

Conversation

@bdraco
Copy link
Copy Markdown
Member

@bdraco bdraco commented Oct 24, 2020

What do these changes do?

Restores previous behavior of not throwing an exception when sending a zero byte file.

Are there changes in behavior for the user?

Regression fix

Related issue number

Fixes #5124

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

@bdraco bdraco requested a review from asvetlov as a code owner October 24, 2020 22:43
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 24, 2020
@bdraco bdraco force-pushed the handle_zero_byte_files branch from 67ab952 to 8843964 Compare October 24, 2020 22:47
@codecov-io
Copy link
Copy Markdown

codecov-io commented Oct 24, 2020

Codecov Report

Merging #5125 into master will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5125      +/-   ##
==========================================
+ Coverage   97.50%   97.54%   +0.03%     
==========================================
  Files          43       43              
  Lines        8824     8825       +1     
  Branches     1415     1416       +1     
==========================================
+ Hits         8604     8608       +4     
+ Misses        103      102       -1     
+ Partials      117      115       -2     
Flag Coverage Δ
#unit 97.54% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiohttp/web_fileresponse.py 99.46% <100.00%> (+1.61%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fed31f...8843964. Read the comment docs.

Copy link
Copy Markdown
Member

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

@aio-libs-github-bot
Copy link
Copy Markdown
Contributor

💚 Backport successful

The PR was backported to the following branches:

aio-libs-github-bot bot added a commit that referenced this pull request Oct 25, 2020
Backports the following commits to 3.7:
 - Ensure zero byte files can be sent (#5125)

Co-authored-by: J. Nick Koston <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sending 0 byte files now triggers an exception in 3.7.0

3 participants