]> granicus.if.org Git - apache/commitdiff
* modules/proxy/mod_proxy_http.c (ap_proxy_http_process_response):
authorJoe Orton <jorton@apache.org>
Fri, 10 Feb 2012 14:52:25 +0000 (14:52 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 10 Feb 2012 14:52:25 +0000 (14:52 +0000)
  Treat EAGAIN as an error for a blocking read from the input filter
  stack.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1242798 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_http.c

index 64b95a2fb791700779a0bc23cf5065a05ce625fb..97b8edd3d88690afccb1d8406c4c07c62a00985d 100644 (file)
@@ -1964,8 +1964,9 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
 
                     /* ap_get_brigade will return success with an empty brigade
                      * for a non-blocking read which would block: */
-                    if (APR_STATUS_IS_EAGAIN(rv)
-                        || (rv == APR_SUCCESS && APR_BRIGADE_EMPTY(bb))) {
+                    if (mode == APR_NONBLOCK_READ
+                        && (APR_STATUS_IS_EAGAIN(rv)
+                            || (rv == APR_SUCCESS && APR_BRIGADE_EMPTY(bb)))) {
                         /* flush to the client and switch to blocking mode */
                         e = apr_bucket_flush_create(c->bucket_alloc);
                         APR_BRIGADE_INSERT_TAIL(bb, e);