>-----Original Message-----
>From: Justin Erenkrantz [mailto:[EMAIL PROTECTED]
[SNIP]
>> +
>> AP_CORE_DECLARE(void) ap_flush_conn(conn_rec *c)
>> {
>> apr_bucket_brigade *bb;
>> apr_bucket *b;
>> +
>> + ap_end_connection(c);
>
>I wouldn't split this out into two functions that both create
>a brigade and
>pass it. I'd just create the EOC bucket and stick it *after*
>the flush bucket
>(see below for why I think that ordering makes sense).
I was not too sure if ap_end_connection() should be called from within
ap_flush_conn(). I was thinking a better place would be just before the
apr_socket_close(). If you think ap_flush_conn() is the correct place, then I'll move
the meat to within ap_flush_conn().
[SNIP]
>> + else if (AP_BUCKET_IS_EOC(bucket)) {
>> + /* The special "EOC" bucket means a shutdown is needed;
>> + * turn off buffering in bio_filter_out_write.
>> + */
>> + filter_ctx->nobuffer = 1;
>> + status = ssl_filter_io_shutdown(filter_ctx, f->c, 0);
>> + apr_bucket_delete(bucket);
>
>Actually, I don't think we need nobuffer. Or, could we end up being
>recursively called when we call shutdown? (I forget the call
>ordering here.)
It's to prevent the buffering of the Alert message in bio_filter_out_write() - the
message resulting from SSL_shutdown() should be just forced down rather than buffering.
[SNIP]
>
>I would also not delete this bucket, I'd just try to leave it
>there to pass on
>to the next filter. I'd want the core_conn_filter to see the
>EOC as well.
>That *might* mean the ordering should be FLUSH *then* EOC
>instead of EOC
>*then* FLUSH (as you have it now).
>
I'll try it - but I wonder what happens if the alert message gets stuck - how to flush
it ?
-Madhu