libmicrohttpd

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

commit 736fe430cb7d54e40bd65879adf2f4585350a1f3
parent eaae7f5c54f8ac55785fdd25a59216b80801ea77
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Tue, 22 Dec 2020 03:59:26 +0300

MHD_send_sendfile_: Fixed wrong send size.

Fixed typo, 9e45e2486f4e24552439cef43d61d841229a8fea regression

Diffstat:
Msrc/microhttpd/mhd_send.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c @@ -1094,14 +1094,15 @@ MHD_send_sendfile_ (struct MHD_Connection *connection) left = connection->response->total_size - connection->response_write_position; - if ( (uint64_t) SSIZE_MAX > left) + if ( (uint64_t) SSIZE_MAX < left) left = SSIZE_MAX; + /* Do not allow system to stick sending on single fast connection: * use 128KiB chunks (2MiB for thread-per-connection). */ if (chunk_size < left) { send_size = chunk_size; - push_data = false; /* No need to push data, there is more to send, */ + push_data = false; /* No need to push data, there is more to send. */ } else {