commit bf9e99729c52c2462390ce1d29eeda7f0f337b26 parent 692e8c56553a4ec0a432704816b8340711b68aed Author: Evgeny Grin (Karlson2k) <k2k@narod.ru> Date: Fri, 21 Oct 2022 12:13:31 +0300 Do not send "100 Continue" if part of the request body is already received Diffstat:
| M | src/microhttpd/connection.c | | | 6 | +++++- |
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -4935,8 +4935,12 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) continue; if (connection->suspended) continue; + if ( (NULL == connection->rp.response) && - (need_100_continue (connection)) ) + (need_100_continue (connection)) && + /* If the client is already sending the payload (body) + there is no need to send "100 Continue" */ + (0 == connection->read_buffer_offset) ) { connection->state = MHD_CONNECTION_CONTINUE_SENDING; break;