Skip to content
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(zip): skip reading position for non-seekable async streams #754

Merged
merged 2 commits into from May 24, 2022

Conversation

piksel
Copy link
Member

@piksel piksel commented May 24, 2022

The async version of PutNextEntry tries to read the target streams position to be able to correctly patch the sizes, even if the stream doesn't support seeking. This causes a NotSupported exception to be thrown when used with common non-seekable target streams.

Fixes #731.

I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License.

@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

Merging #754 (4f14817) into master (d843d6d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #754   +/-   ##
=======================================
  Coverage   74.09%   74.10%           
=======================================
  Files          71       71           
  Lines        8440     8441    +1     
=======================================
+ Hits         6254     6255    +1     
  Misses       2186     2186           
Impacted Files Coverage Δ
src/ICSharpCode.SharpZipLib/Zip/ZipOutputStream.cs 87.82% <100.00%> (+0.04%) ⬆️

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 d843d6d...4f14817. Read the comment docs.

@piksel piksel merged commit b5b1b07 into master May 24, 2022
@piksel piksel deleted the fix/zip-async-ro-stream branch May 24, 2022 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to stream Zip File in controller's Response.Body
1 participant