libmicrohttpd

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

commit 7c88233a645884a468625effd7d8a3e0a0622e94
parent 7e0cf71faeee6d64d584ec293962f944b08f075d
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 13 Nov 2011 12:36:59 +0000

trying to fix issue with 'connectin: close' header duplicated in footer reported by Dirk on mailinglist

Diffstat:
MChangeLog | 7++++++-
Msrc/daemon/connection.c | 3++-
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git 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 @@ -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,