]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* modules/ssl/ssl_engine_io.c (ssl_io_filter_coalesce): Treat zero-length
authorJoe Orton <jorton@apache.org>
Wed, 1 Apr 2020 07:55:22 +0000 (07:55 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 1 Apr 2020 07:55:22 +0000 (07:55 +0000)
  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

modules/ssl/ssl_engine_io.c

index bbcb6a38f93f43bbe80310f22822785b32c6651f..35ccc14ec5666ba48bbe2e8db4da2da16b12b71e 100644 (file)
@@ -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,