evanmiller / mod_zip

Streaming ZIP archiver for nginx 📦
https://www.nginx.com/resources/wiki/modules/zip/
BSD 3-Clause "New" or "Revised" License
215 stars 64 forks source link

Allow empty zip files. Require a line break at the end. #99

Open dimaryaz opened 1 year ago

dimaryaz commented 1 year ago

An empty zip file is completely valid, but the current mod_zip syntax does not support them. This comes up in cases where e.g. a user clicks "Download this folder" - and the backend needs to special-case empty folders and use different code to generate an empty .zip file.

This is technically a breaking change - though the documentation does not say anything about trailing line breaks, and it seems unlikely that anyone would actually rely on the last line break being optional.