diff options
author | ng0 <ng0@n0.is> | 2019-07-29 17:20:40 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-07-29 17:20:40 +0000 |
commit | abc998d21921c5f183bea6818c25b1d3b7df09bb (patch) | |
tree | a094da219513e637e4fb71fca76d56952ab7dab4 | |
parent | 1bcbd2c008389dec0a58ed6fdbfeb10404cf58af (diff) | |
download | libmicrohttpd-abc998d21921c5f183bea6818c25b1d3b7df09bb.tar.gz libmicrohttpd-abc998d21921c5f183bea6818c25b1d3b7df09bb.zip |
check before post_ function if we need to set want_cork to false
-rw-r--r-- | src/microhttpd/mhd_send.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index 8f34d8d4..2ea4dfa3 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c | |||
@@ -340,6 +340,9 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection, | |||
340 | ret = writev (s, vector, iovcnt); | 340 | ret = writev (s, vector, iovcnt); |
341 | #endif | 341 | #endif |
342 | 342 | ||
343 | if (ret == header_len + buffer_len) | ||
344 | want_cork = false; | ||
345 | |||
343 | post_cork_setsockopt (connection, want_cork); | 346 | post_cork_setsockopt (connection, want_cork); |
344 | 347 | ||
345 | return ret; | 348 | return ret; |