libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 0b4e8535a30c4b76dbb95b1c598f0a44325046d1
parent 5cdd75f23ff9191b20107e0c56d3b0678683ac5d
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Tue, 28 Feb 2017 19:16:37 +0300

MHD_get_timeout(): fixed incorrect timeout for TLS connections.
If connection is in "MHD_EVENT_LOOP_INFO_WRITE" mode, any pending incoming data should not
result in zero timeout.
Already handled properly by 'data_already_pending'.
Note: old check was incorrect even for "MHD_EVENT_LOOP_INFO_READ" connections as only
first connection in "normal timeout" list was checked.

Diffstat:
Msrc/microhttpd/daemon.c | 10----------
1 file changed, 0 insertions(+), 10 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -2992,11 +2992,6 @@ MHD_get_timeout (struct MHD_Daemon *daemon, if ( (! have_timeout) || (earliest_deadline > pos->last_activity + pos->connection_timeout) ) earliest_deadline = pos->last_activity + pos->connection_timeout; -#ifdef HTTPS_SUPPORT - if ( (0 != (daemon->options & MHD_USE_TLS)) && - (0 != gnutls_record_check_pending (pos->tls_session)) ) - earliest_deadline = 0; -#endif /* HTTPS_SUPPORT */ have_timeout = MHD_YES; } } @@ -3008,11 +3003,6 @@ MHD_get_timeout (struct MHD_Daemon *daemon, if ( (! have_timeout) || (earliest_deadline > pos->last_activity + pos->connection_timeout) ) earliest_deadline = pos->last_activity + pos->connection_timeout; -#ifdef HTTPS_SUPPORT - if ( (0 != (daemon->options & MHD_USE_TLS)) && - (0 != gnutls_record_check_pending (pos->tls_session)) ) - earliest_deadline = 0; -#endif /* HTTPS_SUPPORT */ have_timeout = MHD_YES; }