aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/connection.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2008-11-08 09:21:08 +0000
committerChristian Grothoff <christian@grothoff.org>2008-11-08 09:21:08 +0000
commit77fad50adfdcd5fff1c5b7c7b5aa9f1e166ede99 (patch)
tree7710eb6de190bc70e1654e2d442ea3287cdb3eb1 /src/daemon/connection.c
parenteea5080786234ad8d8d73b49dcca2b3d1c44ae7a (diff)
downloadlibmicrohttpd-77fad50adfdcd5fff1c5b7c7b5aa9f1e166ede99.tar.gz
libmicrohttpd-77fad50adfdcd5fff1c5b7c7b5aa9f1e166ede99.zip
fixing mantis 1434
Diffstat (limited to 'src/daemon/connection.c')
-rw-r--r--src/daemon/connection.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/daemon/connection.c b/src/daemon/connection.c
index c0e3f4b5..9a346bc7 100644
--- a/src/daemon/connection.c
+++ b/src/daemon/connection.c
@@ -1921,6 +1921,14 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
1921 continue; 1921 continue;
1922 } 1922 }
1923 connection->state = MHD_CONNECTION_HEADERS_SENDING; 1923 connection->state = MHD_CONNECTION_HEADERS_SENDING;
1924
1925#if HAVE_TCP_CORK
1926 /* starting header send, set TCP cork */
1927 {
1928 const int val = 1;
1929 setsockopt(connection->socket_fd, IPPROTO_TCP, TCP_CORK, &val, sizeof(val));
1930 }
1931#endif
1924 break; 1932 break;
1925 case MHD_CONNECTION_HEADERS_SENDING: 1933 case MHD_CONNECTION_HEADERS_SENDING:
1926 /* no default action */ 1934 /* no default action */
@@ -1976,6 +1984,13 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
1976 /* no default action */ 1984 /* no default action */
1977 break; 1985 break;
1978 case MHD_CONNECTION_FOOTERS_SENT: 1986 case MHD_CONNECTION_FOOTERS_SENT:
1987#if HAVE_TCP_CORK
1988 /* done sending, uncork */
1989 {
1990 const int val = 0;
1991 setsockopt(connection->socket_fd, IPPROTO_TCP, TCP_CORK, &val, sizeof(val));
1992 }
1993#endif
1979 MHD_destroy_response (connection->response); 1994 MHD_destroy_response (connection->response);
1980 if (connection->daemon->notify_completed != NULL) 1995 if (connection->daemon->notify_completed != NULL)
1981 connection->daemon->notify_completed (connection-> 1996 connection->daemon->notify_completed (connection->