diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-04-27 14:01:57 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-04-27 22:11:54 +0300 |
commit | 0424af2a045c0266155b76da868ff668c8e9bfbc (patch) | |
tree | cc839211ef38ad389baba2a0a5f2b1fd0f93aeaf | |
parent | b8e13a57a0035f1f416d593d64115bd4417c2028 (diff) | |
download | libmicrohttpd-0424af2a045c0266155b76da868ff668c8e9bfbc.tar.gz libmicrohttpd-0424af2a045c0266155b76da868ff668c8e9bfbc.zip |
Response from callback: do allow negative return amounts, except predefined values
-rw-r--r-- | src/microhttpd/connection.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 60b6931b..9f0016b5 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -1071,8 +1071,7 @@ try_ready_normal_body (struct MHD_Connection *connection) | |||
1071 | (size_t) MHD_MIN ((uint64_t) response->data_buffer_size, | 1071 | (size_t) MHD_MIN ((uint64_t) response->data_buffer_size, |
1072 | response->total_size | 1072 | response->total_size |
1073 | - connection->response_write_position)); | 1073 | - connection->response_write_position)); |
1074 | if ( (MHD_CONTENT_READER_END_OF_STREAM == ret) || | 1074 | if (0 > ret) |
1075 | (MHD_CONTENT_READER_END_WITH_ERROR == ret) ) | ||
1076 | { | 1075 | { |
1077 | /* either error or http 1.0 transfer, close socket! */ | 1076 | /* either error or http 1.0 transfer, close socket! */ |
1078 | /* TODO: do not update total size, check whether response | 1077 | /* TODO: do not update total size, check whether response |