httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1723122 - in /httpd/httpd/trunk: CHANGES modules/ssl/ssl_engine_io.c
Date Tue, 05 Jan 2016 16:52:30 GMT
Author: ylavic
Date: Tue Jan  5 16:52:29 2016
New Revision: 1723122

URL: http://svn.apache.org/viewvc?rev=1723122&view=rev
Log:
mod_ssl: Avoid one TLS record (application data) fragmentation by including
the last suitable bucket when coalescing.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/ssl/ssl_engine_io.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1723122&r1=1723121&r2=1723122&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Jan  5 16:52:29 2016
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_ssl: Avoid one TLS record (application data) fragmentation by
+     including the last suitable bucket when coalescing.  [Yann Ylavic]
+
   *) mod_http2: reworked synching of session shutdown with worker threads. h2 
      workers now stick to a session until no more reuqquest are tbd, keepalive 
      handling revisited, users report problems with connection close without

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_io.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_io.c?rev=1723122&r1=1723121&r2=1723122&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_io.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_io.c Tue Jan  5 16:52:29 2016
@@ -1532,7 +1532,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;
@@ -1559,10 +1559,10 @@ static apr_status_t ssl_io_filter_coales
              && (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
@@ -1571,7 +1571,7 @@ static apr_status_t ssl_io_filter_coales
      */
     if (bytes > 0
         && (count > 1
-            || (count == 1 && APR_BUCKET_NEXT(last) == APR_BRIGADE_SENTINEL(bb))))
{
+            || (count == 1 && endb == APR_BRIGADE_SENTINEL(bb)))) {
         /* If coalescing some bytes, ensure a context has been
          * created. */
         if (!ctx) {
@@ -1588,7 +1588,7 @@ static apr_status_t ssl_io_filter_coales
          * 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;



Mime
View raw message