From: Yann Ylavic Date: Wed, 6 Jan 2016 11:36:01 +0000 (+0000) Subject: mod_ssl: follow up to r1723122, r1723143. X-Git-Tag: 2.5.0-alpha~2453 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b3237cd3bffb38bfe5ff26902f823d3672b1527;p=thirdparty%2Fapache%2Fhttpd.git mod_ssl: follow up to r1723122, r1723143. s/endb/upto/ in ssl_io_filter_coalesce() and update CHANGES to include r1723143. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1723284 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index d22273f955c..2bd0ecf6f3d 100644 --- a/CHANGES +++ b/CHANGES @@ -7,8 +7,9 @@ Changes with Apache 2.5.0 correctly show in scoreboard. Fixed possible race in connection shutdown after review by Ylavic. [Stefan Eissing] - *) mod_ssl: Avoid one TLS record (application data) fragmentation by - including the last suitable bucket when coalescing. [Yann Ylavic] + *) mod_ssl: Save some TLS record (application data) fragmentations by + including the last and subsequent suitable buckets when coalescing. + [Yann Ylavic] *) mod_cache_socache: Fix a possible cached entity body corruption when it is received from an origin server in multiple batches and forwarded by diff --git a/modules/ssl/ssl_engine_io.c b/modules/ssl/ssl_engine_io.c index 8c6d8ac97e9..595e14e0c9d 100644 --- a/modules/ssl/ssl_engine_io.c +++ b/modules/ssl/ssl_engine_io.c @@ -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, *endb; + apr_bucket *e, *upto; apr_size_t bytes = 0; struct coalesce_ctx *ctx = f->ctx; unsigned count = 0; @@ -1562,7 +1562,7 @@ static apr_status_t ssl_io_filter_coalesce(ap_filter_t *f, if (e->length) count++; /* don't count zero-length buckets */ bytes += e->length; } - endb = e; + upto = 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_coalesce(ap_filter_t *f, */ if (bytes > 0 && (count > 1 - || (endb == APR_BRIGADE_SENTINEL(bb)) + || (upto == APR_BRIGADE_SENTINEL(bb)) || (ctx && ctx->bytes > 0))) { /* If coalescing some bytes, ensure a context has been * created. */ @@ -1589,7 +1589,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 != endb) { + while (e != upto) { apr_size_t len; const char *data; apr_bucket *next;