mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-26 04:09:30 +03:00
hopefully fixing #1967
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
+11
-3
@@ -944,9 +944,18 @@ MHD_add_connection (struct MHD_Daemon *daemon,
|
||||
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 @@ MHD_add_connection (struct MHD_Daemon *daemon,
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HTTPS_SUPPORT
|
||||
if (0 != (daemon->options & MHD_USE_SSL))
|
||||
|
||||
Reference in New Issue
Block a user