diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-13 15:09:30 +0400 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-13 15:09:30 +0400 |
commit | 319f8ebef8a9e48cb74b220d4585552928549266 (patch) | |
tree | a6f292129a04b9eba6d2a2aef353e49e8b5a14e0 /networking | |
parent | f5635f4d327c7f4ce34026c64548585dd7b59ffc (diff) |
httpd: round down sendfile byte count to 64k
*: style fixes
Diffstat (limited to 'networking')
-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) 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; |