httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Sysoev>
Subject FreeBSD sendfile
Date Thu, 28 Mar 2002 16:24:46 GMT

apr_sendfile() for FreeBSD has workaround for "nbytes!=0 bug"
but this bug had fixed in CURRENT:

So I think code should be following:

#ifdef __FreeBSD_version < 500029
    for (i = 0; i < hdtr->numheaders; i++) {
        bytes_to_send += hdtr->headers[i].iov_len;

But this correct problem at build time only.
Suppose that someone has built Apache 2 on FreeBSD 4.x. Than he will
upgrade FreeBSD to 5.1 or higher. Sometimes it's not possible
to rebuild Apache so he would encounter problem.

So I think that better way is not to use FreeBSD 4.x sendfile()
capability to send header but use emulatation of header
transmition instead.

Igor Sysoev

View raw message