Created attachment 28797 [details] Remove the use of TCP_NOPUSH with sendfile(2) Having updated a web server to apache-2.4 (sendfile enabled), I noticed some static images didn't load in one go: - top parts were displayed instantly - image downloads were frozen for a few seconds - missing bottom parts were then downloaded and displayed instantly Switching EnableSendfile between on/off in httpd.conf enables or disables this behavior 100% of the time After some investigation, it was found this behavior was caused by the use of APR_TCP_NOPUSH in the code path using sendfile(2). Once patch-server_core_filters.c.txt is applied, Apache-2.4 works perfectly fine with sendfile. DragonFly BSD bug report: http://bugs.dragonflybsd.org/issues/2368 pkgsrc problem report: http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=46458
Created attachment 29020 [details] possible fix for TCP_NOPUSH usage Can you try this patch instead? Coverity's static analysis noticed a bug in this code which could well explain the symptoms you're seeing here.
I'm sadly unable to reproduce the original issue with Apache 2.4.10. The last patch doesn't have any visible effect.
The patch proposed by Joe Orton has been merged into 2.4.x branch in r1670328
Fixed in 2.4.x, so closing. (reference to this PR has also been added in CHANGES)