On Mon, Oct 28, 2013 at 12:22 PM, Eric Covener <[email protected]> wrote:
> On Mon, Oct 28, 2013 at 11:52 AM, Graham Leggett <[email protected]> wrote:
>> Hi all,
>>
>> I am currently trying to find out why mod_ssl stops
>> CONN_STATE_WRITE_COMPLETION from working correctly, and have noticed that
>> for no clear reason, mod_ssl flushes the output filters when it receives an
>> EOS bucket:
>>
>> https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl/ssl_engine_io.c
>>
>> /* 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 (bio_filter_out_flush(filter_ctx->pbioWrite) < 0) {
>> status = outctx->rc;
>> break;
>> }
>>
>> It would seem at the very least in order for any kind of write completion to
>> be possible we would need to stop mod_ssl from trying to flush on EOS. Is
>> there a specific problem that mod_ssl tries to solve by doing this?
>
> If you go back to e.g. r91413 and look at the entire file, it seems
> that the EOS used to flush out some data buffered in openssl:
Sorry, stray gmail keystrongs, meant to include
ssl_io_filter_Output()
...
APR_BRIGADE_FOREACH(bucket, bb) {
const char *data;
apr_size_t len, n;
if (APR_BUCKET_IS_EOS(bucket)) {
if ((ret = churn_output(ctx)) != APR_SUCCESS) {
churn_output()
...
if (BIO_pending(ctx->pbioWrite)) {
... flush