[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r19268 - in libmicrohttpd: . src/daemon
From: |
gnunet |
Subject: |
[GNUnet-SVN] r19268 - in libmicrohttpd: . src/daemon |
Date: |
Thu, 19 Jan 2012 22:17:29 +0100 |
Author: grothoff
Date: 2012-01-19 22:17:29 +0100 (Thu, 19 Jan 2012)
New Revision: 19268
Modified:
libmicrohttpd/ChangeLog
libmicrohttpd/src/daemon/daemon.c
Log:
hopefully fixing #1967
Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog 2012-01-19 17:49:19 UTC (rev 19267)
+++ libmicrohttpd/ChangeLog 2012-01-19 21:17:29 UTC (rev 19268)
@@ -1,5 +1,13 @@
-Thu Jan 19 17:46:05 CET 2012
- Fixing use of uninitialized 'earliest_deadline' variable in
+Thu Jan 19 22:11:12 CET 2012
+ Switch to non-blocking sockets for all systems but Cygwin
+ (we already used non-blocking sockets for GNU/Linux); also
+ use non-blocking sockets on Cygwin for HTTPS as this is
+ required to avoid DoS-by-partial-record via gnutls. On
+ Cygwin, #1824 implies that we need to use blocking sockets
+ for HTTP on Cygwin for now. -CG
+
+Thu Jan 19 17:46:05 CET 2012
+ Fixing use of uninitialized 'earliest_deadline' variable in
MHD_get_timeout which can lead to returning an incorrect
(too early) timeout (#2085). -tclaveirole
Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c 2012-01-19 17:49:19 UTC (rev 19267)
+++ libmicrohttpd/src/daemon/daemon.c 2012-01-19 21:17:29 UTC (rev 19268)
@@ -944,9 +944,18 @@
MHD_set_http_callbacks_ (connection);
connection->recv_cls = &recv_param_adapter;
connection->send_cls = &send_param_adapter;
-#if LINUX
+ /* non-blocking sockets are required on most systems and for GNUtls;
+ however, they somehow cause serious problems on CYGWIN (#1824) */
+#ifdef CYGWIN
+ if
+#if HTTPS_SUPPORT
+ (0 != (daemon->options & MHD_USE_SSL))
+#else
+ (0)
+#endif
+#endif
{
- /* non-blocking sockets perform better on Linux */
+ /* make socket non-blocking */
int flags = fcntl (connection->socket_fd, F_GETFL);
if ( (flags == -1) ||
(0 != fcntl (connection->socket_fd, F_SETFL, flags | O_NONBLOCK)) )
@@ -957,7 +966,6 @@
#endif
}
}
-#endif
#if HTTPS_SUPPORT
if (0 != (daemon->options & MHD_USE_SSL))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r19268 - in libmicrohttpd: . src/daemon,
gnunet <=