]> granicus.if.org Git - apache/commitdiff
Change the return code from APR_TIMEUP to APR_ECONNABORTED, which seems
authorBill Stoddard <stoddard@apache.org>
Wed, 2 Jan 2002 19:12:40 +0000 (19:12 +0000)
committerBill Stoddard <stoddard@apache.org>
Wed, 2 Jan 2002 19:12:40 +0000 (19:12 +0000)
to be a bit more descriptive. Move the check to inside the inner while()
loop and add an additional check for eos. If we get an EOS bucket, there
is no point in going further. Hopefully this will fix the last seg fault
in the function.

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

modules/proxy/proxy_util.c

index 71828d70c4aabbfe5dba99ea09c728965e7764ca..1d35acda54925dc570bb929649539384fd27afc7 100644 (file)
@@ -1020,13 +1020,12 @@ PROXY_DECLARE(apr_status_t) ap_proxy_string_read(conn_rec *c, apr_bucket_brigade
                                                 &zero /* readline */))) {
             return rv;
         }
-        if (APR_BRIGADE_EMPTY(bb)) {
-            /* The connection aborted or timed out */
-            return APR_TIMEUP;
-        }
-
         /* loop through each bucket */
         while (!found) {
+            if (*eos || APR_BRIGADE_EMPTY(bb)) {
+                /* The connection aborted or timed out */
+                return APR_ECONNABORTED;
+            }
             e = APR_BRIGADE_FIRST(bb);
             if (APR_BUCKET_IS_EOS(e)) {
                 *eos = 1;