download was 0 bytes, as libcurl would then return the size as unknown (-1) and not 0. I wrote a fix and test case 566 to verify it.
(http://curl.haxx.se/bug/view.cgi?id=2884561) but it seems to work for me...