libmicrohttpd

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

commit 15043c6d6ced6ccc1fd6843d6cccc702ce40e299
parent 5dd538547872e461a174b6ca89615178c4e1b854
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 30 Mar 2011 11:03:33 +0000

possible fix for 1670

Diffstat:
MChangeLog | 4++++
Msrc/daemon/daemon.c | 1+
Msrc/examples/digest_auth_example.c | 1+
3 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,7 @@ +Wed Mar 30 12:56:09 CEST 2011 + Initialize tv_usec in MHD_USE_THREAD_PER_CONNECTION with select + and per-connection timeout. -CG + Tue Mar 29 14:15:13 CEST 2011 Releasing libmicrohttpd 0.9.9. -CG diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c @@ -581,6 +581,7 @@ MHD_handle_connection (void *data) tv.tv_sec = 0; else tv.tv_sec = timeout - (now - con->last_activity); + tv.tv_usec = 0; tvp = &tv; } if ((con->state == MHD_CONNECTION_NORMAL_BODY_UNREADY) || diff --git a/src/examples/digest_auth_example.c b/src/examples/digest_auth_example.c @@ -128,6 +128,7 @@ main (int argc, char *const *argv) NULL, NULL, &ahc_echo, PAGE, MHD_OPTION_DIGEST_AUTH_RANDOM, sizeof(rnd), rnd, MHD_OPTION_NONCE_NC_SIZE, 300, + MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 120, MHD_OPTION_END); if (d == NULL) return 1;