diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-07-25 20:12:49 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-07-25 20:12:49 +0200 |
commit | 20c16b79274adc3fa3a5ce0d8f53aeb83ad001db (patch) | |
tree | 2d21442bdd1c6d1c6d6d89d1d40fe3a1a90681d5 /src/microhttpd/mhd_send.c | |
parent | 9ed35bc8df36b4e52d96d404e233bf3a73b2d2b7 (diff) | |
download | libmicrohttpd-20c16b79274adc3fa3a5ce0d8f53aeb83ad001db.tar.gz libmicrohttpd-20c16b79274adc3fa3a5ce0d8f53aeb83ad001db.zip |
simplify
Diffstat (limited to 'src/microhttpd/mhd_send.c')
-rw-r--r-- | src/microhttpd/mhd_send.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index d680f55b..c6a1dec5 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c | |||
@@ -397,8 +397,6 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
397 | #ifdef HTTPS_SUPPORT | 397 | #ifdef HTTPS_SUPPORT |
398 | using_tls = (0 != (connection->daemon->options & MHD_USE_TLS)); | 398 | using_tls = (0 != (connection->daemon->options & MHD_USE_TLS)); |
399 | #endif | 399 | #endif |
400 | if (! (have_more || using_tls)) | ||
401 | pre_cork_setsockopt (connection, want_cork); | ||
402 | 400 | ||
403 | #ifdef HTTPS_SUPPORT | 401 | #ifdef HTTPS_SUPPORT |
404 | if (using_tls) | 402 | if (using_tls) |
@@ -444,6 +442,8 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
444 | #endif | 442 | #endif |
445 | { | 443 | { |
446 | /* plaintext transmission */ | 444 | /* plaintext transmission */ |
445 | if (! have_more) | ||
446 | pre_cork_setsockopt (connection, want_cork); | ||
447 | #if MSG_MORE | 447 | #if MSG_MORE |
448 | ret = send (s, | 448 | ret = send (s, |
449 | buffer, | 449 | buffer, |
@@ -476,10 +476,10 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
476 | else if (buffer_size > (size_t) ret) | 476 | else if (buffer_size > (size_t) ret) |
477 | connection->epoll_state &= ~MHD_EPOLL_STATE_WRITE_READY; | 477 | connection->epoll_state &= ~MHD_EPOLL_STATE_WRITE_READY; |
478 | #endif /* EPOLL_SUPPORT */ | 478 | #endif /* EPOLL_SUPPORT */ |
479 | if (! have_more) | ||
480 | post_cork_setsockopt (connection, want_cork); | ||
479 | } | 481 | } |
480 | 482 | ||
481 | if (! (have_more || using_tls)) | ||
482 | post_cork_setsockopt (connection, want_cork); | ||
483 | return ret; | 483 | return ret; |
484 | } | 484 | } |
485 | 485 | ||