From 7c88233a645884a468625effd7d8a3e0a0622e94 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 13 Nov 2011 12:36:59 +0000 Subject: trying to fix issue with 'connectin: close' header duplicated in footer reported by Dirk on mailinglist --- ChangeLog | 7 ++++++- src/daemon/connection.c | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5474e8e2..364fc5c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ +Sun Nov 13 13:34:29 CET 2011 + Trying to fix accidental addition of a "Connection: close" footer + under certain (rare) circumstances. -CG + Fri Nov 4 10:03:00 CET 2011 - Small updates to the tutorial. -CG + Small updates to the tutorial. + Releasing 0.9.16. -CG Thu Nov 3 10:14:59 CET 2011 shutdown(RDWR) fails on OS X after shutdown(RD), so only use diff --git a/src/daemon/connection.c b/src/daemon/connection.c index e30e019a..d78d5eef 100644 --- a/src/daemon/connection.c +++ b/src/daemon/connection.c @@ -671,7 +671,8 @@ build_header_response (struct MHD_Connection *connection) kind = MHD_FOOTER_KIND; off = 0; } - must_add_close = ( (connection->read_closed == MHD_YES) && + must_add_close = ( (connection->state == MHD_CONNECTION_FOOTERS_RECEIVED) && + (connection->read_closed == MHD_YES) && (0 == strcasecmp (connection->version, MHD_HTTP_VERSION_1_1)) && (NULL == MHD_get_response_header (connection->response, -- cgit v1.2.3