From: Graham Leggett Date: Sat, 16 Nov 2013 18:50:45 +0000 (+0000) Subject: mod_ssl: Don't flush when an EOS is received. Prepares mod_ssl X-Git-Tag: 2.5.0-alpha~4851 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6aafe58a02c419d337308a6bb85c9a12e8e02f0d;p=apache mod_ssl: Don't flush when an EOS is received. Prepares mod_ssl to support write completion. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542546 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 7e79aa8293..79848fced3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_ssl: Don't flush when an EOS is received. Prepares mod_ssl + to support write completion. [Graham Leggett] + *) Fix potential rejection of valid MaxMemFree and ThreadStackSize directives. [Mike Rumph ] diff --git a/modules/ssl/ssl_engine_io.c b/modules/ssl/ssl_engine_io.c index 4c4382da91..e766f09660 100644 --- a/modules/ssl/ssl_engine_io.c +++ b/modules/ssl/ssl_engine_io.c @@ -1681,31 +1681,30 @@ static apr_status_t ssl_io_filter_output(ap_filter_t *f, /* If it is a flush or EOS, we need to pass this down. * These types do not require translation by OpenSSL. */ - if (APR_BUCKET_IS_EOS(bucket) || APR_BUCKET_IS_FLUSH(bucket)) { + if (APR_BUCKET_IS_EOS(bucket)) { + /* + * By definition, nothing can come after EOS. + * which also means we can pass the rest of this brigade + * without creating a new one since it only contains the + * EOS bucket. + */ + + if ((status = ap_pass_brigade(f->next, bb)) != APR_SUCCESS) { + return status; + } + break; + } + else if (APR_BUCKET_IS_FLUSH(bucket)) { + if (bio_filter_out_flush(filter_ctx->pbioWrite) < 0) { status = outctx->rc; break; } - if (APR_BUCKET_IS_EOS(bucket)) { - /* - * By definition, nothing can come after EOS. - * which also means we can pass the rest of this brigade - * without creating a new one since it only contains the - * EOS bucket. - */ - - if ((status = ap_pass_brigade(f->next, bb)) != APR_SUCCESS) { - return status; - } - break; - } - else { - /* bio_filter_out_flush() already passed down a flush bucket - * if there was any data to be flushed. - */ - apr_bucket_delete(bucket); - } + /* bio_filter_out_flush() already passed down a flush bucket + * if there was any data to be flushed. + */ + apr_bucket_delete(bucket); } else if (AP_BUCKET_IS_EOC(bucket)) { /* The EOC bucket indicates connection closure, so SSL