summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-09-22 06:05:48 (GMT)
committer Nikos Mavrogiannopoulos <nmav@gnutls.org>2010-09-22 06:05:48 (GMT)
commit7ce01c9c9325468b6ed85ba64a9899d12cfe0fa0 (patch)
tree9031cc082de2ca8e51cec1e2420c525070ea72b9
parent41dd507c65c56bc88d73f8080efe4febdf1016e1 (diff)
Corrected behavior in Keep-Alive connections (do not
terminate the connection prematurely)
-rw-r--r--NEWS4
-rw-r--r--src/gnutls_io.c14
2 files changed, 7 insertions, 11 deletions
diff --git a/NEWS b/NEWS
index 7053a95..fe85119 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
1** Version 0.5.9 (unreleased)
2- Corrected behavior in Keep-Alive connections (do not
3 terminate the connection prematurely)
4
1** Version 0.5.8 (2010-08-18) 5** Version 0.5.8 (2010-08-18)
2- Session tickets are enabled by default. 6- Session tickets are enabled by default.
3 7
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);