Andrew Bancroft 12/28/2013

DotNetZip – Solving Mac Decompression Issues

Read Original

This article addresses a common problem when using the DotNetZip library in an ASP.NET Web API service: zip files downloaded on Macs fail to extract, often creating .cpgz files instead. The root cause is the HTTP response content type set to 'application/zip', which triggers Safari's automatic decompression and corrupts the archive. The solution is to change the content type to 'application/octet-stream', preventing Safari from interfering. The article provides step-by-step details, code examples, and explains why this fix works, making it useful for developers handling file downloads across platforms.

DotNetZip – Solving Mac Decompression Issues

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser