mirror of https://github.com/sysown/proxysql
This patch fixes the processing of POST parameters for content type 'application/x-www-form-urlencoded'. Prior to this patch if a final key is present in the params without a value, it's left unprocessed.pull/3874/head
parent
28cb149887
commit
b25a0ca381
@ -0,0 +1,19 @@
|
||||
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)
|
||||
{
|
||||
Loading…
Reference in new issue