]> granicus.if.org Git - apache/commitdiff
If we get EAGAIN returned from apr_sendfile, then we need to loop back and
authorRyan Bloom <rbb@apache.org>
Fri, 22 Dec 2000 23:43:16 +0000 (23:43 +0000)
committerRyan Bloom <rbb@apache.org>
Fri, 22 Dec 2000 23:43:16 +0000 (23:43 +0000)
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

CHANGES
modules/http/http_core.c

diff --git a/CHANGES b/CHANGES
index 7ebeb8f1f5e0e995c297476aea7421dabef82c35..afdf0859591f6fd7dc8666448cdc7e310739ea7f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
 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>]
 
index d680ca7a673b6c6a8701c36a7e5717ae6db785ce..e2d156c506075272cd8f9fa144b7e1db515aaa65 100644 (file)
@@ -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 */ 
         }