]> granicus.if.org Git - apache/commitdiff
backport of r1723122,1723143
authorStefan Eissing <icing@apache.org>
Thu, 28 Jan 2016 16:13:54 +0000 (16:13 +0000)
committerStefan Eissing <icing@apache.org>
Thu, 28 Jan 2016 16:13:54 +0000 (16:13 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1727393 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/ssl/ssl_engine_io.c

diff --git a/CHANGES b/CHANGES
index 7e5a885019e3c24ba35a6ff43bff23f9f98d450b..eb47e0796107b22facd464435ca3c05160c6a811 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
 
 Changes with Apache 2.4.19
 
+  *) mod_ssl: Save some TLS record (application data) fragmentations by
+     including the last and subsequent suitable buckets when coalescing.
 
   *) mod_proxy_fcgi: Suppress HTTP error 503 and message 01075, 
      "Error dispatching request", when the cause appears to be 
diff --git a/STATUS b/STATUS
index 986fff01bcae63d418ebc4f953f8af4b41527103..016b7b2a8529a39fc838fbb623442bd8a0992b96 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -112,16 +112,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mod_ssl: Save some TLS record (application data) fragmentations by
-     including the last and subsequent suitable buckets when coalescing.
-     trunk patch: http://svn.apache.org/r1723122
-                  http://svn.apache.org/r1723143
-                  http://svn.apache.org/r1723284
-     2.4.x patch: trunk works, modulo CHANGES (from both r1723122,1723284)
-                  For convenience (possibly):
-                  http://people.apache.org/~ylavic/httpd-2.4.x-ssl_io_filter_coalesce.patch
-     +1: ylavic, jim, icing
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index 23ba739df7663bb0a03d5b9b3029b10601584795..7476b148133b83e9cc3a7cf6f73f28df17801a45 100644 (file)
@@ -1463,7 +1463,7 @@ struct coalesce_ctx {
 static apr_status_t ssl_io_filter_coalesce(ap_filter_t *f,
                                            apr_bucket_brigade *bb)
 {
-    apr_bucket *e, *last = NULL;
+    apr_bucket *e, *endb;
     apr_size_t bytes = 0;
     struct coalesce_ctx *ctx = f->ctx;
     unsigned count = 0;
@@ -1490,19 +1490,20 @@ static apr_status_t ssl_io_filter_coalesce(ap_filter_t *f,
              && (ctx == NULL
                  || bytes + ctx->bytes + e->length < COALESCE_BYTES);
          e = APR_BUCKET_NEXT(e)) {
-        last = e;
         if (e->length) count++; /* don't count zero-length buckets */
         bytes += e->length;
     }
+    endb = e;
 
     /* Coalesce the prefix, if:
      * a) more than one bucket is found to coalesce, or
      * b) the brigade contains only a single data bucket, or
-     * c)
+     * c) the data bucket is not last but we have buffered data already.
      */
     if (bytes > 0
         && (count > 1
-            || (count == 1 && APR_BUCKET_NEXT(last) == APR_BRIGADE_SENTINEL(bb)))) {
+            || (endb == APR_BRIGADE_SENTINEL(bb))
+            || (ctx && ctx->bytes > 0))) {
         /* If coalescing some bytes, ensure a context has been
          * created. */
         if (!ctx) {
@@ -1519,7 +1520,7 @@ static apr_status_t ssl_io_filter_coalesce(ap_filter_t *f,
          * normal path of sending the buffer + remaining buckets in
          * brigade.  */
         e = APR_BRIGADE_FIRST(bb);
-        while (e != last) {
+        while (e != endb) {
             apr_size_t len;
             const char *data;
             apr_bucket *next;