aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-10 15:33:50 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-10 15:33:50 +0000
commitb742dc221dbd57b8d28e1881be23435f6109c572 (patch)
treef47183556b2257beaaa3eea3897beaf154cdc75f
parentc55535a0b8b1512875b988fd994282bf67169065 (diff)
downloadlibmicrohttpd-b742dc221dbd57b8d28e1881be23435f6109c572.tar.gz
libmicrohttpd-b742dc221dbd57b8d28e1881be23435f6109c572.zip
-disable use of shutdown on W32
-rw-r--r--ChangeLog5
-rw-r--r--src/include/microhttpd.h7
-rw-r--r--src/microhttpd/daemon.c5
3 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 342c9e7b..a29b6cb8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
1Sat Aug 10 17:31:31 CEST 2013
2 Disable use of 'shutdown' on W32 always as winsock
3 doesn't properly behave with half-closed connections
4 (see http://www.chilkatsoft.com/p/p_299.asp). -CG/LRN
5
1Thu Aug 8 07:55:07 CEST 2013 6Thu Aug 8 07:55:07 CEST 2013
2 Fixing issue with pipelining not working as desired. -CG 7 Fixing issue with pipelining not working as desired. -CG
3 8
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 92827650..29699fd0 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -439,8 +439,11 @@ enum MHD_FLAG
439 MHD_USE_DUAL_STACK = MHD_USE_IPv6 | 2048, 439 MHD_USE_DUAL_STACK = MHD_USE_IPv6 | 2048,
440 440
441 /** 441 /**
442 * Enable EPOLL turbo. Only useful with MHD_USE_EPOLL_LINUX_ONLY. 442 * Enable EPOLL turbo. Disables certain calls to 'shutdown'
443 * Highly experimental, do not use in production yet. 443 * and enables aggressive non-blocking optimisitc reads.
444 * Most effects only happen with MHD_USE_EPOLL_LINUX_ONLY.
445 * Enalbed always on W32 as winsock doesn't properly behave
446 * with shutdown and this then fixes potential problems.
444 */ 447 */
445 MHD_USE_EPOLL_TURBO = 4096 448 MHD_USE_EPOLL_TURBO = 4096
446 449
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index a6a93e77..29b61053 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -2841,6 +2841,11 @@ MHD_start_daemon_va (unsigned int flags,
2841#endif 2841#endif
2842 daemon->socket_fd = -1; 2842 daemon->socket_fd = -1;
2843 daemon->options = (enum MHD_OPTION) flags; 2843 daemon->options = (enum MHD_OPTION) flags;
2844#if WINDOWS
2845 /* Winsock is broken with respect to 'shutdown';
2846 this disables us calling 'shutdown' on W32. */
2847 daemon->options |= MHD_USE_EPOLL_TURBO;
2848#endif
2844 daemon->port = port; 2849 daemon->port = port;
2845 daemon->apc = apc; 2850 daemon->apc = apc;
2846 daemon->apc_cls = apc_cls; 2851 daemon->apc_cls = apc_cls;