(This is about revision e380a8c.)
Excuse me if I am mistaken, but it seems that the length of a file delivered using sendfile is implicitly capped by the capacity of size_t.
to is an off_t which seems to be the correct type for a file size. On systems where sizeof(size_t) < sizeof(off_t) the truncating cast makes it impossible to deliver file ranges longer than SIZE_T_MAX correctly. On 32-bit systems SIZE_T_MAX is typically 2^32-1 which would be an archaic file size limit.
(This is about revision e380a8c.) Excuse me if I am mistaken, but it seems that the length of a file delivered using sendfile is implicitly capped by the capacity of size_t.
common/lwan-serve-files.c:778
to is an off_t which seems to be the correct type for a file size. On systems where sizeof(size_t) < sizeof(off_t) the truncating cast makes it impossible to deliver file ranges longer than SIZE_T_MAX correctly. On 32-bit systems SIZE_T_MAX is typically 2^32-1 which would be an archaic file size limit.