From 319f8ebef8a9e48cb74b220d4585552928549266 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 13 Aug 2007 11:09:30 +0000 Subject: httpd: round down sendfile byte count to 64k *: style fixes --- networking/httpd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'networking/httpd.c') 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; -- cgit v1.2.3