From 77e60359755a54291a0138f05fc9a6e96c833724 Mon Sep 17 00:00:00 2001 From: Chuck Murcko Date: Thu, 28 Jun 2001 12:48:57 +0000 Subject: [PATCH] Reorganize ap_proxy_string_read() internally to not process eos buckets. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89473 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/CHANGES | 15 ++++++++++++--- modules/proxy/proxy_util.c | 29 +++++++++++++++-------------- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/modules/proxy/CHANGES b/modules/proxy/CHANGES index 1ec2291504..a584c19c4e 100644 --- a/modules/proxy/CHANGES +++ b/modules/proxy/CHANGES @@ -1,9 +1,15 @@ mod_proxy changes for httpd 2.0.18-dev + *) Reorganize ap_proxy_string_read() internally to not process eos + buckets. + [Chuck Murcko ] + [Victor Orlikowski ] + *) Remove result code check for FTP QUIT command. Some servers send nothing at all back in response to QUIT. [Chuck Murcko ] + [Victor Orlikowski ] *) Reverse previous patch since the core reverted. [Chuck Murcko ] @@ -130,9 +136,12 @@ mod_proxy changes for httpd 2.0.18-dev mod_proxy changes for 2.0.14 alpha *) removed ProxyNoCache and ProxyCacheForceCompletion config directives, - since we no longer directly cache from this module [Chuck Murcko] + since we no longer directly cache from this module + [Chuck Murcko ] - *) removed cache [Chuck Murcko] + *) removed cache + [Chuck Murcko ] - *) initial rerebuild for 2.0 [Chuck Murcko] + *) initial rerebuild for 2.0 + [Chuck Murcko ] diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 62dd1afab0..b52f874fb3 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1110,21 +1110,22 @@ PROXY_DECLARE(apr_status_t) ap_proxy_string_read(conn_rec *c, apr_bucket_brigade e = APR_BRIGADE_FIRST(bb); if (APR_BUCKET_IS_EOS(e)) { *eos = 1; - continue; - } - if (APR_SUCCESS != apr_bucket_read(e, (const char **)&response, &len, APR_BLOCK_READ)) { - return rv; - } + } + else { + if (APR_SUCCESS != apr_bucket_read(e, (const char **)&response, &len, APR_BLOCK_READ)) { + return rv; + } /* is string LF terminated? */ - if (memchr(response, APR_ASCII_LF, len)) { - found = 1; - } - /* concat strings until buff is full - then throw the data away */ - if (len > ((bufflen-1)-(pos-buff))) { - len = (bufflen-1)-(pos-buff); - } - if (len > 0) { - pos = apr_cpystrn(pos, response, len); + if (memchr(response, APR_ASCII_LF, len)) { + found = 1; + } + /* concat strings until buff is full - then throw the data away */ + if (len > ((bufflen-1)-(pos-buff))) { + len = (bufflen-1)-(pos-buff); + } + if (len > 0) { + pos = apr_cpystrn(pos, response, len); + } } APR_BUCKET_REMOVE(e); apr_bucket_destroy(e); -- 2.50.1