Skip to content

Present empty Debian component file instead of 404

While testing !108492 (merged) with aptly, I found out that older versions of aptly (0.9.7-1, from Debian 9 stretch oldoldstable) fail when a Packages file returns 404.

This is because carrierwave is not creating a file when it's size is empty. And #present_carrierwave_file! will raise not_found! when called on such file.

While newer versions of aptly don't have this problem, we should still fix this to return an empty body for such component files.

Note to the reviewers: The patch in the specs add 48 more examples (~25 seconds on my machine).

Merge request reports