diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-10-21 12:13:31 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-10-22 09:48:07 +0300 |
commit | bf9e99729c52c2462390ce1d29eeda7f0f337b26 (patch) | |
tree | f03d2cca792ab72e2b79ae099f23535fc5637b0a | |
parent | 692e8c56553a4ec0a432704816b8340711b68aed (diff) | |
download | libmicrohttpd-bf9e99729c52c2462390ce1d29eeda7f0f337b26.tar.gz libmicrohttpd-bf9e99729c52c2462390ce1d29eeda7f0f337b26.zip |
Do not send "100 Continue" if part of the request body is already received
-rw-r--r-- | src/microhttpd/connection.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 885557b5..0f94422b 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -4935,8 +4935,12 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) | |||
4935 | continue; | 4935 | continue; |
4936 | if (connection->suspended) | 4936 | if (connection->suspended) |
4937 | continue; | 4937 | continue; |
4938 | |||
4938 | if ( (NULL == connection->rp.response) && | 4939 | if ( (NULL == connection->rp.response) && |
4939 | (need_100_continue (connection)) ) | 4940 | (need_100_continue (connection)) && |
4941 | /* If the client is already sending the payload (body) | ||
4942 | there is no need to send "100 Continue" */ | ||
4943 | (0 == connection->read_buffer_offset) ) | ||
4940 | { | 4944 | { |
4941 | connection->state = MHD_CONNECTION_CONTINUE_SENDING; | 4945 | connection->state = MHD_CONNECTION_CONTINUE_SENDING; |
4942 | break; | 4946 | break; |