diff options
Diffstat (limited to 'networking/httpd.c')
-rw-r--r-- | networking/httpd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 3e3117a79..9c02ad679 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -1395,7 +1395,8 @@ static int sendFile(const char *url) | |||
1395 | fd++; /* write to fd #1 in inetd mode */ | 1395 | fd++; /* write to fd #1 in inetd mode */ |
1396 | #if ENABLE_FEATURE_HTTPD_USE_SENDFILE | 1396 | #if ENABLE_FEATURE_HTTPD_USE_SENDFILE |
1397 | do { | 1397 | do { |
1398 | count = sendfile(fd, f, &offset, MAXINT(ssize_t)); | 1398 | /* byte count is rounded down to 64k */ |
1399 | count = sendfile(fd, f, &offset, MAXINT(ssize_t) - 0xffff); | ||
1399 | if (count < 0) { | 1400 | if (count < 0) { |
1400 | if (offset == 0) | 1401 | if (offset == 0) |
1401 | goto fallback; | 1402 | goto fallback; |