diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-10-20 19:22:14 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-10-22 09:48:07 +0300 |
commit | f1c69db3000e65a992e33190f3d272a5b9ca7462 (patch) | |
tree | a38326d0403b6f9821a86419560a55f8ef654c65 /src/microhttpd/internal.h | |
parent | bf9e99729c52c2462390ce1d29eeda7f0f337b26 (diff) | |
download | libmicrohttpd-f1c69db3000e65a992e33190f3d272a5b9ca7462.tar.gz libmicrohttpd-f1c69db3000e65a992e33190f3d272a5b9ca7462.zip |
Reworked partial processing of the upload
Now if some data has been processed by Access Handler Callback, zero
timeout is used for the next turn and at the same time more data is
read (if available) from the network.
If Access Handler Callback has not processed any data, MHD will wait
for additional data to come.
Diffstat (limited to 'src/microhttpd/internal.h')
-rw-r--r-- | src/microhttpd/internal.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h index 990552b7..78481b21 100644 --- a/src/microhttpd/internal.h +++ b/src/microhttpd/internal.h | |||
@@ -1022,6 +1022,18 @@ struct MHD_Request | |||
1022 | uint64_t current_chunk_offset; | 1022 | uint64_t current_chunk_offset; |
1023 | 1023 | ||
1024 | /** | 1024 | /** |
1025 | * Indicate that some of the upload payload data have been processed | ||
1026 | * by the last call of the connection handler. | ||
1027 | * If any data have been processed, but some data left in the buffer | ||
1028 | * for further processing, then MHD will use zero timeout before the | ||
1029 | * next data processing round. | ||
1030 | * If no data have been processed, than MHD will wait for more data | ||
1031 | * to come (as it makes no sense to call the connection handler with | ||
1032 | * the same conditions). | ||
1033 | */ | ||
1034 | bool some_payload_processed; | ||
1035 | |||
1036 | /** | ||
1025 | * We allow the main application to associate some pointer with the | 1037 | * We allow the main application to associate some pointer with the |
1026 | * HTTP request, which is passed to each #MHD_AccessHandlerCallback | 1038 | * HTTP request, which is passed to each #MHD_AccessHandlerCallback |
1027 | * and some other API calls. Here is where we store it. (MHD does | 1039 | * and some other API calls. Here is where we store it. (MHD does |