[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r7864 - in libmicrohttpd: . src/daemon src/examples
From: |
gnunet |
Subject: |
[GNUnet-SVN] r7864 - in libmicrohttpd: . src/daemon src/examples |
Date: |
Sat, 8 Nov 2008 02:21:10 -0700 (MST) |
Author: grothoff
Date: 2008-11-08 02:21:08 -0700 (Sat, 08 Nov 2008)
New Revision: 7864
Modified:
libmicrohttpd/AUTHORS
libmicrohttpd/ChangeLog
libmicrohttpd/configure.ac
libmicrohttpd/src/daemon/connection.c
libmicrohttpd/src/examples/minimal_example_comet.c
Log:
fixing mantis 1434
Modified: libmicrohttpd/AUTHORS
===================================================================
--- libmicrohttpd/AUTHORS 2008-11-08 00:34:31 UTC (rev 7863)
+++ libmicrohttpd/AUTHORS 2008-11-08 09:21:08 UTC (rev 7864)
@@ -14,6 +14,7 @@
Thomas Martin <address@hidden>
Peter Ross <address@hidden>
RuXu W <address@hidden>
+Matthew Moore
Documentation contributions also came from:
Marco Maggi <address@hidden>
Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog 2008-11-08 00:34:31 UTC (rev 7863)
+++ libmicrohttpd/ChangeLog 2008-11-08 09:21:08 UTC (rev 7864)
@@ -1,3 +1,8 @@
+Sat Nov 8 02:18:42 MST 2008
+ Unset TCP_CORK at the end of transmitting a response
+ to improve performance (on systems where this is
+ supported). -MM
+
Tue Sep 30 16:48:08 MDT 2008
Make MHD useful to Cygwin users; detect IPv6 headers
in configure.
@@ -3,5 +8,5 @@
Sun Sep 28 14:57:46 MDT 2008
- Unescape URIs (convert "%ef%e4%45" to "中国").
+ Unescape URIs (convert "%ef%e4%45" to "中国"). -CG
Wed Sep 10 22:43:59 MDT 2008
Modified: libmicrohttpd/configure.ac
===================================================================
--- libmicrohttpd/configure.ac 2008-11-08 00:34:31 UTC (rev 7863)
+++ libmicrohttpd/configure.ac 2008-11-08 09:21:08 UTC (rev 7864)
@@ -136,7 +136,7 @@
AC_CHECK_HEADERS([fcntl.h math.h errno.h limits.h stdio.h locale.h sys/stat.h
sys/types.h pthread.h],,AC_MSG_ERROR([Compiling libmicrohttpd requires standard
UNIX headers files]))
# Check for optional headers
-AC_CHECK_HEADERS([sys/select.h sys/types.h sys/time.h sys/msg.h netdb.h
netinet/in.h time.h sys/socket.h sys/mman.h arpa/inet.h])
+AC_CHECK_HEADERS([sys/select.h sys/types.h sys/time.h sys/msg.h netdb.h
netinet/in.h netinet/tcp.h time.h sys/socket.h sys/mman.h arpa/inet.h])
# IPv6
AC_MSG_CHECKING(for IPv6)
@@ -161,6 +161,8 @@
)
AC_MSG_RESULT($have_inet6)
+# TCP_CORK
+AC_CHECK_DECL([TCP_CORK], [], [], [[#include <netinet/tcp.h>]])
# libcurl (required for testing)
SAVE_LIBS=$LIBS
Modified: libmicrohttpd/src/daemon/connection.c
===================================================================
--- libmicrohttpd/src/daemon/connection.c 2008-11-08 00:34:31 UTC (rev
7863)
+++ libmicrohttpd/src/daemon/connection.c 2008-11-08 09:21:08 UTC (rev
7864)
@@ -1921,6 +1921,14 @@
continue;
}
connection->state = MHD_CONNECTION_HEADERS_SENDING;
+
+#if HAVE_TCP_CORK
+ /* starting header send, set TCP cork */
+ {
+ const int val = 1;
+ setsockopt(connection->socket_fd, IPPROTO_TCP, TCP_CORK, &val,
sizeof(val));
+ }
+#endif
break;
case MHD_CONNECTION_HEADERS_SENDING:
/* no default action */
@@ -1976,6 +1984,13 @@
/* no default action */
break;
case MHD_CONNECTION_FOOTERS_SENT:
+#if HAVE_TCP_CORK
+ /* done sending, uncork */
+ {
+ const int val = 0;
+ setsockopt(connection->socket_fd, IPPROTO_TCP, TCP_CORK, &val,
sizeof(val));
+ }
+#endif
MHD_destroy_response (connection->response);
if (connection->daemon->notify_completed != NULL)
connection->daemon->notify_completed (connection->
Modified: libmicrohttpd/src/examples/minimal_example_comet.c
===================================================================
--- libmicrohttpd/src/examples/minimal_example_comet.c 2008-11-08 00:34:31 UTC
(rev 7863)
+++ libmicrohttpd/src/examples/minimal_example_comet.c 2008-11-08 09:21:08 UTC
(rev 7864)
@@ -31,9 +31,11 @@
char * buf,
int max)
{
+ if (max < 80)
+ return 0;
memset(buf, 'A', max-1);
- buf[max-1] = '\n';
- return max;
+ buf[79] = '\n';
+ return 80;
}
static int
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r7864 - in libmicrohttpd: . src/daemon src/examples,
gnunet <=