gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r34728 - libmicrohttpd/src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r34728 - libmicrohttpd/src/microhttpd
Date: Sat, 20 Dec 2014 02:31:24 +0100

Author: grothoff
Date: 2014-12-20 02:31:24 +0100 (Sat, 20 Dec 2014)
New Revision: 34728

Modified:
   libmicrohttpd/src/microhttpd/connection.c
Log:
-just to be sure, also check if client set Connection: close at the end

Modified: libmicrohttpd/src/microhttpd/connection.c
===================================================================
--- libmicrohttpd/src/microhttpd/connection.c   2014-12-20 01:08:40 UTC (rev 
34727)
+++ libmicrohttpd/src/microhttpd/connection.c   2014-12-20 01:31:24 UTC (rev 
34728)
@@ -2291,6 +2291,7 @@
   unsigned int timeout;
   const char *end;
   char *line;
+  int client_close;
 
   connection->in_idle = MHD_YES;
   while (1)
@@ -2589,6 +2590,7 @@
           end =
             MHD_get_response_header (connection->response,
                                     MHD_HTTP_HEADER_CONNECTION);
+          client_close = ((NULL != end) && (0 == strcasecmp (end, "close")));
           MHD_destroy_response (connection->response);
           connection->response = NULL;
           if ( (NULL != daemon->notify_completed) &&
@@ -2604,6 +2606,7 @@
             MHD_lookup_connection_value (connection, MHD_HEADER_KIND,
                                          MHD_HTTP_HEADER_CONNECTION);
           if ( (MHD_YES == connection->read_closed) ||
+               (client_close) ||
                ((NULL != end) && (0 == strcasecmp (end, "close"))) )
             {
               connection->read_closed = MHD_YES;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]