aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gnutls_io.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/gnutls_io.c b/src/gnutls_io.c
index ba03fce..6db2b28 100644
--- a/src/gnutls_io.c
+++ b/src/gnutls_io.c
@@ -555,15 +555,7 @@ apr_status_t mgs_filter_output(ap_filter_t * f,
555 while (!APR_BRIGADE_EMPTY(bb)) { 555 while (!APR_BRIGADE_EMPTY(bb)) {
556 apr_bucket *bucket = APR_BRIGADE_FIRST(bb); 556 apr_bucket *bucket = APR_BRIGADE_FIRST(bb);
557 557
558 if (AP_BUCKET_IS_EOC(bucket) || APR_BUCKET_IS_EOS(bucket)) { 558 if (AP_BUCKET_IS_EOC(bucket)) {
559 apr_bucket_brigade * tmpb;
560
561 if (APR_BUCKET_IS_EOS(bucket)) {
562 tmpb = bb;
563 } else {
564 tmpb = ctxt->output_bb;
565 }
566
567 if (ctxt->session != NULL) { 559 if (ctxt->session != NULL) {
568 do { 560 do {
569 ret = gnutls_bye( ctxt->session, GNUTLS_SHUT_WR); 561 ret = gnutls_bye( ctxt->session, GNUTLS_SHUT_WR);
@@ -573,7 +565,7 @@ apr_status_t mgs_filter_output(ap_filter_t * f,
573 apr_bucket_copy(bucket, &e); 565 apr_bucket_copy(bucket, &e);
574 APR_BRIGADE_INSERT_TAIL(ctxt->output_bb, e); 566 APR_BRIGADE_INSERT_TAIL(ctxt->output_bb, e);
575 567
576 if ((status = ap_pass_brigade(f->next, tmpb)) != APR_SUCCESS) { 568 if ((status = ap_pass_brigade(f->next, ctxt->output_bb)) != APR_SUCCESS) {
577 apr_brigade_cleanup(ctxt->output_bb); 569 apr_brigade_cleanup(ctxt->output_bb);
578 return status; 570 return status;
579 } 571 }
@@ -584,7 +576,7 @@ apr_status_t mgs_filter_output(ap_filter_t * f,
584 ctxt->session = NULL; 576 ctxt->session = NULL;
585 } 577 }
586 continue; 578 continue;
587 } else if (APR_BUCKET_IS_FLUSH(bucket)) { 579 } else if (APR_BUCKET_IS_FLUSH(bucket) || APR_BUCKET_IS_EOS(bucket)) {
588 580
589 apr_bucket_copy(bucket, &e); 581 apr_bucket_copy(bucket, &e);
590 APR_BRIGADE_INSERT_TAIL(ctxt->output_bb, e); 582 APR_BRIGADE_INSERT_TAIL(ctxt->output_bb, e);