httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r480193 - /httpd/httpd/trunk/modules/http/http_filters.c
Date Tue, 28 Nov 2006 20:36:49 GMT
Author: jim
Date: Tue Nov 28 12:36:47 2006
New Revision: 480193

URL: http://svn.apache.org/viewvc?view=rev&rev=480193
Log:
Protect against any sort of non-block read that
would block. If ap_get_brigade() shows that, return
EAGAIN.

Modified:
    httpd/httpd/trunk/modules/http/http_filters.c

Modified: httpd/httpd/trunk/modules/http/http_filters.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_filters.c?view=diff&rev=480193&r1=480192&r2=480193
==============================================================================
--- httpd/httpd/trunk/modules/http/http_filters.c (original)
+++ httpd/httpd/trunk/modules/http/http_filters.c Tue Nov 28 12:36:47 2006
@@ -216,7 +216,8 @@
 
             /* for timeout */
             if (block == APR_NONBLOCK_READ &&
-                rv == APR_SUCCESS && APR_BRIGADE_EMPTY(bb)) {
+                ( (rv == APR_SUCCESS && APR_BRIGADE_EMPTY(bb)) ||
+                  (APR_STATUS_IS_EAGAIN(rv)) )) {
                 return APR_EAGAIN;
             }
 
@@ -304,7 +305,8 @@
                                         block, 0);
                     /* Test timeout */
                     if (block == APR_NONBLOCK_READ &&
-                        rv == APR_SUCCESS && APR_BRIGADE_EMPTY(bb)) {
+                        ( (rv == APR_SUCCESS && APR_BRIGADE_EMPTY(bb)) ||
+                          (APR_STATUS_IS_EAGAIN(rv)) )) {
                         ctx->state = BODY_CHUNK_PART;
                         return APR_EAGAIN;
                     }



Mime
View raw message