aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_send.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/mhd_send.c')
-rw-r--r--src/microhttpd/mhd_send.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 656a3f14..6ad79fb9 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -130,7 +130,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
130#endif 130#endif
131 131
132#if TCP_CORK 132#if TCP_CORK
133 if ((use_corknopush) && (have_cork && ! want_cork)) 133 if ((! using_tls) && (use_corknopush) && (have_cork && ! want_cork))
134 { 134 {
135 if (0 == setsockopt (s, 135 if (0 == setsockopt (s,
136 IPPROTO_TCP, 136 IPPROTO_TCP,
@@ -156,7 +156,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
156 /* TCP_NOPUSH on FreeBSD is equal to cork on Linux, with the 156 /* TCP_NOPUSH on FreeBSD is equal to cork on Linux, with the
157 * exception that we know that TCP_NOPUSH will definitely 157 * exception that we know that TCP_NOPUSH will definitely
158 * exist and we can disregard TCP_NODELAY unless requested. */ 158 * exist and we can disregard TCP_NODELAY unless requested. */
159 if ((use_corknopush) && (have_cork && ! want_cork)) 159 if ((! using_tls) && (use_corknopush) && (have_cork && ! want_cork))
160 { 160 {
161 if (0 == setsockopt (s, 161 if (0 == setsockopt (s,
162 IPPROTO_TCP, 162 IPPROTO_TCP,
@@ -169,7 +169,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
169 } 169 }
170#endif 170#endif
171#if TCP_NODELAY 171#if TCP_NODELAY
172 if ((! use_corknopush) && (! have_cork && want_cork)) 172 if ((! using_tls) && (! use_corknopush) && (! have_cork && want_cork))
173 { 173 {
174 if (0 == setsockopt (s, 174 if (0 == setsockopt (s,
175 IPPROTO_TCP, 175 IPPROTO_TCP,
@@ -250,9 +250,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
250#endif /* EPOLL_SUPPORT */ 250#endif /* EPOLL_SUPPORT */
251 } 251 }
252#if TCP_CORK 252#if TCP_CORK
253 if (use_corknopush) 253 if ((! using_tls) && (use_corknopush) && (! have_cork && want_cork && ! have_more))
254 {
255 if (! have_cork && want_cork && ! have_more)
256 { 254 {
257 if (0 == setsockopt (s, 255 if (0 == setsockopt (s,
258 IPPROTO_TCP, 256 IPPROTO_TCP,
@@ -271,19 +269,16 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
271 connection->sk_tcp_nodelay_on = false; 269 connection->sk_tcp_nodelay_on = false;
272 } 270 }
273 } 271 }
274 }
275#elif TCP_NOPUSH 272#elif TCP_NOPUSH
276 // We don't have MSG_MORE. 273 // We don't have MSG_MORE.
277 if (use_corknopush) 274 if (use_corknopush)
278 { 275 {
279 // ... 276 if (! have_more && )// ...
280 } 277 }
281#endif 278#endif
282 279
283#if TCP_NODELAY 280#if TCP_NODELAY
284 if (! use_corknopush) 281 if ((! using_tls) && (! use_corknopush) && (have_cork && ! want_cork))
285 {
286 if (have_cork && ! want_cork)
287 { 282 {
288 if (0 == setsockopt (s, 283 if (0 == setsockopt (s,
289 IPPROTO_TCP, 284 IPPROTO_TCP,
@@ -294,7 +289,6 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
294 connection->sk_tcp_nodelay_on = true; 289 connection->sk_tcp_nodelay_on = true;
295 } 290 }
296 } 291 }
297 }
298#endif 292#endif
299 293
300 /* 294 /*