[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r15747 - in libmicrohttpd: . src/daemon
From: |
gnunet |
Subject: |
[GNUnet-SVN] r15747 - in libmicrohttpd: . src/daemon |
Date: |
Wed, 22 Jun 2011 14:33:32 +0200 |
Author: grothoff
Date: 2011-06-22 14:33:32 +0200 (Wed, 22 Jun 2011)
New Revision: 15747
Modified:
libmicrohttpd/ChangeLog
libmicrohttpd/src/daemon/connection.c
Log:
fixing connection close issue mentioned by Robert Varga on MHD mailinglist
Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog 2011-06-22 12:20:33 UTC (rev 15746)
+++ libmicrohttpd/ChangeLog 2011-06-22 12:33:32 UTC (rev 15747)
@@ -1,3 +1,8 @@
+Wed Jun 22 14:32:23 CEST 2011
+ Force closing connection if either the client asked it or
+ if the response contains 'Connection: close' (so far,
+ only the client's request was considered). -CG/RV
+
Wed Jun 22 10:37:35 CEST 2011
Removing listen socket from poll/select sets in
MHD_USE_THREAD_PER_CONNECTION mode; using 'shutdown'
Modified: libmicrohttpd/src/daemon/connection.c
===================================================================
--- libmicrohttpd/src/daemon/connection.c 2011-06-22 12:20:33 UTC (rev
15746)
+++ libmicrohttpd/src/daemon/connection.c 2011-06-22 12:33:32 UTC (rev
15747)
@@ -1935,6 +1935,7 @@
struct MHD_Daemon *daemon;
unsigned int timeout;
const char *end;
+ int rend;
char *line;
while (1)
@@ -2205,6 +2206,10 @@
sizeof (val));
}
#endif
+ end =
+ MHD_get_response_header (connection->response,
+ MHD_HTTP_HEADER_CONNECTION);
+ rend = ( (end != NULL) && (0 == strcasecmp (end, "close")) );
MHD_destroy_response (connection->response);
connection->response = NULL;
if (connection->daemon->notify_completed != NULL)
@@ -2229,7 +2234,7 @@
connection->write_buffer_size = 0;
connection->write_buffer_send_offset = 0;
connection->write_buffer_append_offset = 0;
- if ((end != NULL) && (0 == strcasecmp (end, "close")))
+ if ( (rend) || ((end != NULL) && (0 == strcasecmp (end, "close"))) )
{
connection->read_closed = MHD_YES;
connection->read_buffer_offset = 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r15747 - in libmicrohttpd: . src/daemon,
gnunet <=