httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wsanc...@apache.org
Subject svn commit: r178341 - /httpd/httpd/trunk/server/core_filters.c
Date Wed, 25 May 2005 01:55:28 GMT
Author: wsanchez
Date: Tue May 24 18:55:28 2005
New Revision: 178341

URL: http://svn.apache.org/viewcvs?rev=178341&view=rev
Log:
Commits 160348 and 160352 are obviated by commit 178340 in APR. httpd
should have to deal with EAGAIN on a socket it doesn't know is
non-blocking.

Modified:
    httpd/httpd/trunk/server/core_filters.c

Modified: httpd/httpd/trunk/server/core_filters.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/core_filters.c?rev=178341&r1=178340&r2=178341&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core_filters.c (original)
+++ httpd/httpd/trunk/server/core_filters.c Tue May 24 18:55:28 2005
@@ -522,16 +522,14 @@
         sendlen = togo > sizeof(buffer) ? sizeof(buffer) : togo;
         o = 0;
         rv = apr_file_read(fd, buffer, &sendlen);
-        if (rv == APR_SUCCESS && sendlen) {
-            while ((rv == APR_SUCCESS || APR_STATUS_IS_EAGAIN(rv)) && sendlen) {
-                bytes_sent = sendlen;
-                rv = apr_socket_send(c->client_socket, &buffer[o], &bytes_sent);
-                *nbytes += bytes_sent;
-                if (rv == APR_SUCCESS) {
-                    sendlen -= bytes_sent; /* sendlen != bytes_sent ==> partial write
*/
-                    o += bytes_sent;       /* o is where we are in the buffer */
-                    togo -= bytes_sent;    /* track how much of the file we've sent */
-                }
+        while (rv == APR_SUCCESS && sendlen) {
+            bytes_sent = sendlen;
+            rv = apr_socket_send(c->client_socket, &buffer[o], &bytes_sent);
+            *nbytes += bytes_sent;
+            if (rv == APR_SUCCESS) {
+                sendlen -= bytes_sent; /* sendlen != bytes_sent ==> partial write */
+                o += bytes_sent;       /* o is where we are in the buffer */
+                togo -= bytes_sent;    /* track how much of the file we've sent */
             }
         }
     }



Mime
View raw message