libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 20c16b79274adc3fa3a5ce0d8f53aeb83ad001db
parent 9ed35bc8df36b4e52d96d404e233bf3a73b2d2b7
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 25 Jul 2019 20:12:49 +0200

simplify

Diffstat:
Msrc/microhttpd/mhd_send.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c @@ -397,8 +397,6 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, #ifdef HTTPS_SUPPORT using_tls = (0 != (connection->daemon->options & MHD_USE_TLS)); #endif - if (! (have_more || using_tls)) - pre_cork_setsockopt (connection, want_cork); #ifdef HTTPS_SUPPORT if (using_tls) @@ -444,6 +442,8 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, #endif { /* plaintext transmission */ + if (! have_more) + pre_cork_setsockopt (connection, want_cork); #if MSG_MORE ret = send (s, buffer, @@ -476,10 +476,10 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, else if (buffer_size > (size_t) ret) connection->epoll_state &= ~MHD_EPOLL_STATE_WRITE_READY; #endif /* EPOLL_SUPPORT */ + if (! have_more) + post_cork_setsockopt (connection, want_cork); } - if (! (have_more || using_tls)) - post_cork_setsockopt (connection, want_cork); return ret; }