[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r31997 - in libmicrohttpd: . src/microhttpd
From: |
gnunet |
Subject: |
[GNUnet-SVN] r31997 - in libmicrohttpd: . src/microhttpd |
Date: |
Wed, 22 Jan 2014 09:47:49 +0100 |
Author: grothoff
Date: 2014-01-22 09:47:48 +0100 (Wed, 22 Jan 2014)
New Revision: 31997
Modified:
libmicrohttpd/AUTHORS
libmicrohttpd/ChangeLog
libmicrohttpd/src/microhttpd/daemon.c
Log:
Luke-Jr wrote:
MHD_USE_DUAL_STACK in libmicrohttpd currently just *inhibits setting* the
IPV6_V6ONLY socket option, but per Microsoft's documentation
http://msdn.microsoft.com/en-us/library/windows/desktop/bb513665(v=vs.85).aspx
the default on Windows is that this is enabled, thus MHD_USE_DUAL_STACK will
not work (since it leaves the default). libmicrohttpd should probably just
unconditionally set IPV6_V6ONLY to the desired value when the option is
available.
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 0a33b77..3cbf28e 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3493,8 +3493,7 @@ MHD_start_daemon_va (unsigned int flags,
}
daemon->socket_fd = socket_fd;
- if ( (0 != (flags & MHD_USE_IPv6)) &&
- (MHD_USE_DUAL_STACK != (flags & MHD_USE_DUAL_STACK)) )
+ if (0 != (flags & MHD_USE_IPv6))
{
#ifdef IPPROTO_IPV6
#ifdef IPV6_V6ONLY
@@ -3503,10 +3502,11 @@ MHD_start_daemon_va (unsigned int flags,
and may also be missing on older POSIX systems; good luck if you
have
any of those,
your IPv6 socket may then also bind against IPv4 anyway... */
#ifndef WINDOWS
- const int on = 1;
+ const int
#else
- const char on = 1;
+ const char
#endif
+ on = (MHD_USE_DUAL_STACK != (flags & MHD_USE_DUAL_STACK));
if ( (0 > SETSOCKOPT (socket_fd,
IPPROTO_IPV6, IPV6_V6ONLY,
&on, sizeof (on))) &&
Modified: libmicrohttpd/AUTHORS
===================================================================
--- libmicrohttpd/AUTHORS 2014-01-22 02:25:34 UTC (rev 31996)
+++ libmicrohttpd/AUTHORS 2014-01-22 08:47:48 UTC (rev 31997)
@@ -22,7 +22,7 @@
Colin Caughie <address@hidden>
David Carvalho <address@hidden>
David Reiss <address@hidden>
-Matt Holiday
+Matt Holiday
Michael Cronenworth <address@hidden>
Mika Raento <address@hidden>
Mike Crowe <address@hidden>
@@ -45,6 +45,7 @@
Matthew Mundell <address@hidden>
Scott Goldman <address@hidden>
Jared Cantwell
+Luke-Jr <address@hidden>
Documentation contributions also came from:
Marco Maggi <address@hidden>
Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog 2014-01-22 02:25:34 UTC (rev 31996)
+++ libmicrohttpd/ChangeLog 2014-01-22 08:47:48 UTC (rev 31997)
@@ -1,3 +1,11 @@
+Wed Jan 22 09:44:33 CET 2014
+ MHD_USE_DUAL_STACK in libmicrohttpd currently just *inhibits
+ setting* the IPV6_V6ONLY socket option, but per Microsoft's
+ documentation the default on Windows is that this is enabled, thus
+ MHD_USE_DUAL_STACK will not work (since it leaves the
+ default). libmicrohttpd should probably just unconditionally set
+ IPV6_V6ONLY to the desired value when the option is available. -LJ
+
Wed Jan 1 21:38:18 CET 2014
Allow Keep-Alive with HTTP 1.0 (if explicitly requested),
and automatically set "Connection: Keep-Alive" in response
Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c 2014-01-22 02:25:34 UTC (rev
31996)
+++ libmicrohttpd/src/microhttpd/daemon.c 2014-01-22 08:47:48 UTC (rev
31997)
@@ -3493,8 +3493,7 @@
}
daemon->socket_fd = socket_fd;
- if ( (0 != (flags & MHD_USE_IPv6)) &&
- (MHD_USE_DUAL_STACK != (flags & MHD_USE_DUAL_STACK)) )
+ if (0 != (flags & MHD_USE_IPv6))
{
#ifdef IPPROTO_IPV6
#ifdef IPV6_V6ONLY
@@ -3503,10 +3502,11 @@
and may also be missing on older POSIX systems; good luck if you
have any of those,
your IPv6 socket may then also bind against IPv4 anyway... */
#ifndef WINDOWS
- const int on = 1;
+ const int
#else
- const char on = 1;
+ const char
#endif
+ on = (MHD_USE_DUAL_STACK != (flags & MHD_USE_DUAL_STACK));
if ( (0 > SETSOCKOPT (socket_fd,
IPPROTO_IPV6, IPV6_V6ONLY,
&on, sizeof (on))) &&
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r31997 - in libmicrohttpd: . src/microhttpd,
gnunet <=