libmicrohttpd

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

commit 0424af2a045c0266155b76da868ff668c8e9bfbc
parent b8e13a57a0035f1f416d593d64115bd4417c2028
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Wed, 27 Apr 2022 14:01:57 +0300

Response from callback: do allow negative return amounts, except predefined values

Diffstat:
Msrc/microhttpd/connection.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -1071,8 +1071,7 @@ try_ready_normal_body (struct MHD_Connection *connection) (size_t) MHD_MIN ((uint64_t) response->data_buffer_size, response->total_size - connection->response_write_position)); - if ( (MHD_CONTENT_READER_END_OF_STREAM == ret) || - (MHD_CONTENT_READER_END_WITH_ERROR == ret) ) + if (0 > ret) { /* either error or http 1.0 transfer, close socket! */ /* TODO: do not update total size, check whether response