[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 21/29: process_request_body(): minor readability improve
From: |
gnunet |
Subject: |
[libmicrohttpd] 21/29: process_request_body(): minor readability improvementы |
Date: |
Tue, 20 Jun 2023 22:24:34 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 30bf05560d6e1c87dc1ea91cde5d58330c53af22
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri Jun 16 11:30:07 2023 +0300
process_request_body(): minor readability improvementы
---
src/microhttpd/connection.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 0c49a39d..227fb625 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -3752,7 +3752,7 @@ process_request_body (struct MHD_Connection *connection)
{
instant_retry = false; /* client did not process everything */
#ifdef HAVE_MESSAGES
- if ((left_unprocessed == to_be_processed) &&
+ if ((! connection->rq.some_payload_processed) &&
(! connection->suspended))
{
/* client did not process any upload data, complain if
@@ -3767,8 +3767,6 @@ process_request_body (struct MHD_Connection *connection)
#endif /* HAVE_MESSAGES */
}
processed_size = to_be_processed - left_unprocessed;
- if (connection->rq.have_chunked_upload)
- connection->rq.current_chunk_offset += processed_size;
/* dh left "processed" bytes in buffer for next time... */
buffer_head += processed_size;
available -= processed_size;
@@ -3778,7 +3776,10 @@ process_request_body (struct MHD_Connection *connection)
connection->rq.remaining_upload_size -= processed_size;
}
else
+ {
mhd_assert (MHD_SIZE_UNKNOWN == connection->rq.remaining_upload_size);
+ connection->rq.current_chunk_offset += processed_size;
+ }
} while (instant_retry);
/* TODO: zero out reused memory region */
if ( (available > 0) &&
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] 04/29: Renamed connection state for clarity, (continued)
- [libmicrohttpd] 04/29: Renamed connection state for clarity, gnunet, 2023/06/20
- [libmicrohttpd] 02/29: Re-implemented parsing of the request line from scratch., gnunet, 2023/06/20
- [libmicrohttpd] 08/29: tests: minor improvemnts, gnunet, 2023/06/20
- [libmicrohttpd] 07/29: Removed request line and headers processing old functions and variables, gnunet, 2023/06/20
- [libmicrohttpd] 09/29: daemon: added debug member to avoid accept4() usage, gnunet, 2023/06/20
- [libmicrohttpd] 01/29: Refactoring: check whether memory block is resizable, gnunet, 2023/06/20
- [libmicrohttpd] 06/29: Re-implemented parsing of the request headers and footers from scratch., gnunet, 2023/06/20
- [libmicrohttpd] 12/29: Added back testing with socat as a fallback option, gnunet, 2023/06/20
- [libmicrohttpd] 05/29: Request body processing: removed impossible code paths, gnunet, 2023/06/20
- [libmicrohttpd] 16/29: Added tests with single and double folded header, gnunet, 2023/06/20
- [libmicrohttpd] 21/29: process_request_body(): minor readability improvementы,
gnunet <=
- [libmicrohttpd] 11/29: testzzuf: re-worked zzuf testing, gnunet, 2023/06/20
- [libmicrohttpd] 10/29: testzzuf: added special debug functions, gnunet, 2023/06/20
- [libmicrohttpd] 22/29: Minor refactoring for partially processed request body, gnunet, 2023/06/20
- [libmicrohttpd] 14/29: Added test with folded header placed last, gnunet, 2023/06/20
- [libmicrohttpd] 15/29: Added test with large folded header, gnunet, 2023/06/20
- [libmicrohttpd] 20/29: Added checks for correct values specified for connection memory limits, gnunet, 2023/06/20
- [libmicrohttpd] 19/29: connection: fixed pipelined requests processing, gnunet, 2023/06/20
- [libmicrohttpd] 13/29: Added new tests with header fold, gnunet, 2023/06/20
- [libmicrohttpd] 18/29: Added proper connection's buffers pre-initialisaion, gnunet, 2023/06/20
- [libmicrohttpd] 17/29: connection.c: corrected error responses, gnunet, 2023/06/20