[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r17955 - in libmicrohttpd: . doc/examples src/daemon
From: |
gnunet |
Subject: |
[GNUnet-SVN] r17955 - in libmicrohttpd: . doc/examples src/daemon |
Date: |
Thu, 3 Nov 2011 10:29:31 +0100 |
Author: grothoff
Date: 2011-11-03 10:29:31 +0100 (Thu, 03 Nov 2011)
New Revision: 17955
Modified:
libmicrohttpd/ChangeLog
libmicrohttpd/doc/examples/hellobrowser.c
libmicrohttpd/src/daemon/connection.c
libmicrohttpd/src/daemon/daemon.c
Log:
fixing shutdown issue on OS X -- 1760
Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog 2011-11-03 08:58:14 UTC (rev 17954)
+++ libmicrohttpd/ChangeLog 2011-11-03 09:29:31 UTC (rev 17955)
@@ -1,3 +1,8 @@
+Thu Nov 3 10:14:59 CET 2011
+ shutdown(RDWR) fails on OS X after shutdown(RD), so only use
+ shutdown(WR) if we already closed the socket for reading (otherwise
+ OS X might not do shutdown (WR) at all). -CG
+
Tue Nov 1 18:51:50 CET 2011
Force adding of 'Connection: close' to the header if we (for whatever
reason) are shutting down the socket for reading (see also
Modified: libmicrohttpd/doc/examples/hellobrowser.c
===================================================================
--- libmicrohttpd/doc/examples/hellobrowser.c 2011-11-03 08:58:14 UTC (rev
17954)
+++ libmicrohttpd/doc/examples/hellobrowser.c 2011-11-03 09:29:31 UTC (rev
17955)
@@ -14,7 +14,7 @@
const char *page = "<html><body>Hello, browser!</body></html>";
struct MHD_Response *response;
int ret;
-
+
response =
MHD_create_response_from_buffer (strlen (page), (void *) page,
MHD_RESPMEM_PERSISTENT);
Modified: libmicrohttpd/src/daemon/connection.c
===================================================================
--- libmicrohttpd/src/daemon/connection.c 2011-11-03 08:58:14 UTC (rev
17954)
+++ libmicrohttpd/src/daemon/connection.c 2011-11-03 09:29:31 UTC (rev
17955)
@@ -302,7 +302,8 @@
struct MHD_Daemon *daemon;
daemon = connection->daemon;
- SHUTDOWN (connection->socket_fd, SHUT_RDWR);
+ SHUTDOWN (connection->socket_fd,
+ (connection->read_closed == MHD_YES) ? SHUT_WR : SHUT_RDWR);
connection->state = MHD_CONNECTION_CLOSED;
if ( (NULL != daemon->notify_completed) &&
(MHD_YES == connection->client_aware) )
Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c 2011-11-03 08:58:14 UTC (rev 17954)
+++ libmicrohttpd/src/daemon/daemon.c 2011-11-03 09:29:31 UTC (rev 17955)
@@ -2445,7 +2445,8 @@
abort();
}
for (pos = daemon->connections_head; pos != NULL; pos = pos->next)
- SHUTDOWN (pos->socket_fd, SHUT_RDWR);
+ SHUTDOWN (pos->socket_fd,
+ (pos->read_closed == MHD_YES) ? SHUT_WR : SHUT_RDWR);
if (0 != pthread_mutex_unlock(&daemon->cleanup_connection_mutex))
{
#if HAVE_MESSAGES
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r17955 - in libmicrohttpd: . doc/examples src/daemon,
gnunet <=