From 7a8242ecc0c63a7a02adfb0f3f44254c51e3d7fd Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Wed, 18 Sep 2024 15:46:00 +0200 Subject: [PATCH] mhd_action.h: added doxy for the POST action --- src/mhd2/mhd_action.h | 28 +++++++++++++++++++++++++++- src/mhd2/stream_process_request.c | 3 --- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/mhd2/mhd_action.h b/src/mhd2/mhd_action.h index bd400fed..dd204b88 100644 --- a/src/mhd2/mhd_action.h +++ b/src/mhd2/mhd_action.h @@ -164,15 +164,41 @@ typedef const struct MHD_UploadAction * #endif /* ! MHD_POST_DATA_READER_DEFINED */ -// TODO: correct and describe +/** + * The data for performing POST action + */ struct mhd_PostParseActionData { + /** + * The maximum size allowed for the buffers to parse the POST data. + */ size_t buffer_size; + /** + * The size of the field (in encoded form) above which values are not + * buffered and incrementally "streamed" + */ size_t max_nonstream_size; + /** + * The data encoding to use, + * #MHD_HTTP_POST_ENCODING_OTHER indicates automatic detection + */ enum MHD_HTTP_PostEncoding enc; + /** + * The callback function which process values in "streaming" way. + * Can be NULL. + */ MHD_PostDataReader stream_reader; + /** + * The closure for the @a stream_reader + */ void *reader_cls; + /** + * The "final" callback, called after all POST data has been parsed. + */ MHD_PostDataFinished done_cb; + /** + * The closure for the @a done_cb + */ void *done_cb_cls; }; diff --git a/src/mhd2/stream_process_request.c b/src/mhd2/stream_process_request.c index 271b71ad..6230f1c9 100644 --- a/src/mhd2/stream_process_request.c +++ b/src/mhd2/stream_process_request.c @@ -3002,9 +3002,6 @@ mhd_stream_call_app_request_cb (struct MHD_Connection *restrict c) case mhd_ACTION_ABORT: mhd_conn_pre_close_app_abort (c); return true; -#ifndef HAVE_POST_PARSER - case mhd_ACTION_POST_PARSE: -#endif /* ! HAVE_POST_PARSER */ case mhd_ACTION_NO_ACTION: default: mhd_assert (0 && "Impossible value");