summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
Diffstat (limited to 'networking')
-rw-r--r--networking/httpd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/networking/httpd.c b/networking/httpd.c
index 3e3117a..9c02ad6 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1395,7 +1395,8 @@ static int sendFile(const char *url)
fd++; /* write to fd #1 in inetd mode */
#if ENABLE_FEATURE_HTTPD_USE_SENDFILE
do {
- count = sendfile(fd, f, &offset, MAXINT(ssize_t));
+ /* byte count is rounded down to 64k */
+ count = sendfile(fd, f, &offset, MAXINT(ssize_t) - 0xffff);
if (count < 0) {
if (offset == 0)
goto fallback;