From 9085f5b533fdf85e86c9d7ab2f0f4ac4c8906e2a Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 15 Mar 2010 20:48:49 +0000 Subject: Corrected issue with firefox and long post data (had to do with read function not handling EAGAIN and EINTR correctly). --- diff --git a/NEWS b/NEWS index 5dea61e..124f60a 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,20 @@ -** Version 0.5.5 (unreleased) +** Version 0.5.6 +- Corrected issue with firefox and long POST data (by + handling EINTR and EAGAIN errors in read). + +- Added support for chained client certificates + +- Corrected more issues related to double frees +http://issues.outoforder.cc/view.php?id=102 + +** Version 0.5.5 (2009-06-13) - Removed limits on CA certificate loading. Reported by Sander Marechal and Jack Bates. +- Do not allow sending empty TLS packets even when instructed to. + This had the side effect of clients closing connection. + ** Version 0.5.4 (2009-01-04) - mod_gnutls.h: modified definition to extern to avoid compilation diff --git a/configure.ac b/configure.ac index bb2aedf..54f8daa 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ dnl -AC_INIT(mod_gnutls, 0.5.4) +AC_INIT(mod_gnutls, 0.5.5) OOO_CONFIG_NICE(config.nice) MOD_GNUTLS_VERSION=AC_PACKAGE_VERSION AC_PREREQ(2.53) 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, */ if (APR_STATUS_IS_EAGAIN(rc) || APR_STATUS_IS_EINTR(rc) || (rc == APR_SUCCESS && APR_BRIGADE_EMPTY(ctxt->input_bb))) { - return 0; + + if (APR_STATUS_IS_EOF(ctxt->input_rc)) { + return 0; + } else { + gnutls_transport_set_errno(ctxt->session, EINTR); + return -1; + } } + if (rc != APR_SUCCESS) { /* Unexpected errors discard the brigade */ @@ -689,6 +696,11 @@ ssize_t mgs_transport_read(gnutls_transport_ptr_t ptr, if (APR_STATUS_IS_EAGAIN(ctxt->input_rc) || APR_STATUS_IS_EINTR(ctxt->input_rc)) { + if (len == 0) { + gnutls_transport_set_errno(ctxt->session, EINTR); + return -1; + } + return (ssize_t) len; } -- cgit v0.9.2