You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
proxysql/deps/libhttpserver/final_val_post_process.patch

26 lines
1.0 KiB

commit 3dab3a696e61c341029ad459608f2626e6e5547f
Author: Miro Stauder <miro@proxysql.com>
Date: Mon Jan 9 12:06:29 2023 +0000
final_val_post_process.patch
diff --git a/src/webserver.cpp b/src/webserver.cpp
index 38542f2..e6ef554 100644
--- a/src/webserver.cpp
+++ b/src/webserver.cpp
@@ -674,6 +674,14 @@ MHD_Result webserver::finalize_answer(
{
if(hrm->is_allowed(method))
{
+ // NOTE: Here 'MHD_destroy_post_processor' is required for performing a final 'post_process'
+ // of the 'URL Encode'. This ensures ensures the processing of final key without value left
+ // at the end of the buffer. See function internal doc at 'postprocessor.c'.
+ if (mr->pp != NULL) {
+ MHD_destroy_post_processor(mr->pp);
+ mr->pp = NULL;
+ }
+
mr->dhrs = ((hrm)->*(mr->callback))(*mr->dhr); //copy in memory (move in case)
if (mr->dhrs->get_response_code() == -1)
{