When built with "sendfile" support, httpd is unable to send large files (> 2 GB) in one single connection, terminating it before the full file has been sent. Some programs are smart and try to complete the download, which works (e.g. wget), but some other programs are not smart or do not try to be smart and end up with a truncated file. I *think* the bug resides in httpd.c, line 1626. It reads: IF_FEATURE_HTTPD_RANGES(range_len -= sz;) and I believe it should be: IF_FEATURE_HTTPD_RANGES(range_len -= count;) Because sendfile() returns after 2 GB, which is reflected in "count", and it has to be called more times until the file has been completely sent.
You are absolutely right! Fixed in git, will go into 1.20.x. Thanks!