libmicrohttpd

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

commit a1a0bf1a0a1f6b4fcb55c9cb0262a31759b45a65
parent 9a088e236f55f076d2500f023949bff74f72e930
Author: ng0 <ng0@n0.is>
Date:   Wed, 24 Jul 2019 13:11:34 +0000

function replace.

Diffstat:
Msrc/microhttpd/connection.c | 21+++++----------------
1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -489,22 +489,11 @@ sendfile_adapter (struct MHD_Connection *connection) * No other system in 2019-06 has TCP_CORK. */ if ((! using_tls) && (use_corknopush) && (have_cork && ! want_cork)) { - if (0 == setsockopt (connection->socket_fd, - IPPROTO_TCP, - TCP_CORK, - (const void *) &off_val, - sizeof (off_val))) - { - connection->sk_tcp_nodelay_on = true; - } - else if (0 == setsockopt (connection->socket_fd, - IPPROTO_TCP, - TCP_NODELAY, - (const void *) &on_val, - sizeof (on_val))) - { - connection->sk_tcp_nodelay_on = true; - } + MHD_send_socket_state_cork_nodelay_ (connection, + false, + true, + true, + true); } #elif TCP_NOPUSH /* TCP_NOPUSH on FreeBSD is equal to cork on Linux, with the