From: Bill Stoddard Date: Wed, 2 Jan 2002 19:12:40 +0000 (+0000) Subject: Change the return code from APR_TIMEUP to APR_ECONNABORTED, which seems X-Git-Tag: 2.0.30~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55954a1d643b1eb0d7c4951eb2da7ee53a25e3fa;p=apache Change the return code from APR_TIMEUP to APR_ECONNABORTED, which seems 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 --- diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 71828d70c4..1d35acda54 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -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;