aboutsummaryrefslogtreecommitdiffstats
path: root/src/gnutls_io.c
diff options
context:
space:
mode:
authorGravatar Nikos Mavrogiannopoulos 2010-03-15 20:48:49 +0000
committerGravatar Nokis Mavrogiannopoulos 2010-03-15 20:48:49 +0000
commit9085f5b533fdf85e86c9d7ab2f0f4ac4c8906e2a (patch)
treee493bf6176b6f05a1737cfcf2c5ddd14b4838981 /src/gnutls_io.c
parentdcf11188825117a0ead90b383093e87f9a6ed445 (diff)
Corrected issue with firefox and long post data (had to do
with read function not handling EAGAIN and EINTR correctly).
Diffstat (limited to 'src/gnutls_io.c')
-rw-r--r--src/gnutls_io.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gnutls_io.c b/src/gnutls_io.c
index 15de422..8187da6 100644
--- a/src/gnutls_io.c
+++ b/src/gnutls_io.c
@@ -670,8 +670,15 @@ ssize_t mgs_transport_read(gnutls_transport_ptr_t ptr,
670 */ 670 */
671 if (APR_STATUS_IS_EAGAIN(rc) || APR_STATUS_IS_EINTR(rc) 671 if (APR_STATUS_IS_EAGAIN(rc) || APR_STATUS_IS_EINTR(rc)
672 || (rc == APR_SUCCESS && APR_BRIGADE_EMPTY(ctxt->input_bb))) { 672 || (rc == APR_SUCCESS && APR_BRIGADE_EMPTY(ctxt->input_bb))) {
673 return 0; 673
674 if (APR_STATUS_IS_EOF(ctxt->input_rc)) {
675 return 0;
676 } else {
677 gnutls_transport_set_errno(ctxt->session, EINTR);
678 return -1;
679 }
674 } 680 }
681
675 682
676 if (rc != APR_SUCCESS) { 683 if (rc != APR_SUCCESS) {
677 /* Unexpected errors discard the brigade */ 684 /* Unexpected errors discard the brigade */
@@ -689,6 +696,11 @@ ssize_t mgs_transport_read(gnutls_transport_ptr_t ptr,
689 696
690 if (APR_STATUS_IS_EAGAIN(ctxt->input_rc) 697 if (APR_STATUS_IS_EAGAIN(ctxt->input_rc)
691 || APR_STATUS_IS_EINTR(ctxt->input_rc)) { 698 || APR_STATUS_IS_EINTR(ctxt->input_rc)) {
699 if (len == 0) {
700 gnutls_transport_set_errno(ctxt->session, EINTR);
701 return -1;
702 }
703
692 return (ssize_t) len; 704 return (ssize_t) len;
693 } 705 }
694 706