diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-06-05 22:16:15 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-06-05 22:16:15 +0300 |
commit | 149eaabc678adc8845421b91e477b0b39e792ecd (patch) | |
tree | 1365a13ca314117c7aace25df03b08e3ff6e22ec | |
parent | 6123b2ab2b9c658612df3279567dc709d8eb3220 (diff) | |
download | libmicrohttpd-149eaabc678adc8845421b91e477b0b39e792ecd.tar.gz libmicrohttpd-149eaabc678adc8845421b91e477b0b39e792ecd.zip |
Added TODO comments and corrected log message
-rw-r--r-- | src/microhttpd/connection.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 3102b24f..044b9a01 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -2381,6 +2381,8 @@ process_request_body (struct MHD_Connection *connection) | |||
2381 | 2381 | ||
2382 | if (NULL != connection->response) | 2382 | if (NULL != connection->response) |
2383 | { | 2383 | { |
2384 | /* TODO: discard all read buffer as early response | ||
2385 | * means that connection have to be closed. */ | ||
2384 | /* already queued a response, discard remaining upload | 2386 | /* already queued a response, discard remaining upload |
2385 | (but not more, there might be another request after it) */ | 2387 | (but not more, there might be another request after it) */ |
2386 | size_t purge; | 2388 | size_t purge; |
@@ -2599,6 +2601,7 @@ process_request_body (struct MHD_Connection *connection) | |||
2599 | connection->remaining_upload_size -= processed_size; | 2601 | connection->remaining_upload_size -= processed_size; |
2600 | } | 2602 | } |
2601 | while (MHD_NO != instant_retry); | 2603 | while (MHD_NO != instant_retry); |
2604 | /* TODO: zero out reused memory region */ | ||
2602 | if ( (available > 0) && | 2605 | if ( (available > 0) && |
2603 | (buffer_head != connection->read_buffer) ) | 2606 | (buffer_head != connection->read_buffer) ) |
2604 | memmove (connection->read_buffer, | 2607 | memmove (connection->read_buffer, |
@@ -3840,7 +3843,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) | |||
3840 | /* oops - close! */ | 3843 | /* oops - close! */ |
3841 | CONNECTION_CLOSE_ERROR (connection, | 3844 | CONNECTION_CLOSE_ERROR (connection, |
3842 | _ ( | 3845 | _ ( |
3843 | "Closing connection (failed to create response header).")); | 3846 | "Closing connection (failed to create response footer).")); |
3844 | continue; | 3847 | continue; |
3845 | } | 3848 | } |
3846 | if ( (! connection->have_chunked_upload) || | 3849 | if ( (! connection->have_chunked_upload) || |