Commit 0ae42ca8 authored by Ryan Bloom's avatar Ryan Bloom
Browse files

If we get EAGAIN returned from apr_sendfile, then we need to loop back and

call it again.  This change allows us to serve large files (such as
apache_2.0a9.tar.gz) using Apache 2.0 on FreeBSD.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87514 13f79535-47bb-0310-9956-ffa450edef68
parent 85594081
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
Changes with Apache 2.0b1

  *) If we get EAGAIN returned from the call to apr_sendfile, then we
     need to call sendfile again.  This gets us serving large files
     such as apache_2.0a9.tar.gz on FreeBSD again. [Ryan Bloom]

  *) Get the support programs building cleanly again.
     [Cliff Woolley <cliffwoolley@yahoo.com>]

+1 −1
Original line number Diff line number Diff line
@@ -2605,7 +2605,7 @@ static apr_status_t sendfile_it_all(conn_rec *c,
        rv = apr_sendfile(c->client_socket, fd, hdtr, &file_offset, &tmplen, 
                          flags);
        total_bytes_left -= tmplen;
        if (!total_bytes_left || rv != APR_SUCCESS) {
        if (!total_bytes_left || (rv != APR_SUCCESS && !APR_STATUS_IS_EAGAIN(rv))) {
            return rv;        /* normal case & error exit */ 
        }