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

20 lines
880 B

diff --git src/webserver.cpp src/webserver.cpp
index a3104e9..5ae7381 100644
--- src/webserver.cpp
+++ src/webserver.cpp
@@ -676,6 +676,14 @@ int 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)
{