From: Joe Orton Date: Wed, 1 Apr 2020 07:55:22 +0000 (+0000) Subject: * modules/ssl/ssl_engine_io.c (ssl_io_filter_coalesce): Treat zero-length X-Git-Tag: 2.5.0-alpha2-ci-test-only~1541 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d115959c6dcb8c7d4a2c00fddc16d1a92e153c4;p=thirdparty%2Fapache%2Fhttpd.git * modules/ssl/ssl_engine_io.c (ssl_io_filter_coalesce): Treat zero-length buckets consistently (ignore them) after a morphing bucket morphs. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1875988 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/ssl_engine_io.c b/modules/ssl/ssl_engine_io.c index bbcb6a38f93..35ccc14ec56 100644 --- a/modules/ssl/ssl_engine_io.c +++ b/modules/ssl/ssl_engine_io.c @@ -1766,8 +1766,12 @@ static apr_status_t ssl_io_filter_coalesce(ap_filter_t *f, else { rv = apr_bucket_split(e, COALESCE_BYTES - (buffered + bytes)); } - - if (rv == APR_SUCCESS) { + + if (rv == APR_SUCCESS && e->length == 0) { + /* As above, don't count in the prefix if the bucket is + * now zero-length. */ + } + else if (rv == APR_SUCCESS) { ap_log_cerror(APLOG_MARK, APLOG_TRACE4, 0, f->c, "coalesce: adding %" APR_SIZE_T_FMT " bytes " "from split bucket, adding %" APR_SIZE_T_FMT,