Skip to content

Commit cea0fe9

Browse files
author
Sebastiano Merlino
committed
Modified in order to parse qs in POST/PUT cases
1 parent 35147d3 commit cea0fe9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/webserver.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -665,16 +665,17 @@ int webserver::answer_to_connection(void* cls, MHD_Connection* connection,
665665
mr->dhr->set_path(st_url);
666666
mr->dhr->set_method(method);
667667

668-
if ( 0 == strcmp(method, MHD_HTTP_METHOD_DELETE) ||
668+
/* if ( 0 == strcmp(method, MHD_HTTP_METHOD_DELETE) ||
669669
0 == strcmp(method, MHD_HTTP_METHOD_GET) ||
670670
0 == strcmp(method, MHD_HTTP_METHOD_CONNECT) ||
671671
0 == strcmp(method, MHD_HTTP_METHOD_HEAD) ||
672672
0 == strcmp(method, MHD_HTTP_METHOD_TRACE)
673673
)
674674
{
675675
MHD_get_connection_values (connection, MHD_GET_ARGUMENT_KIND, &build_request_args, (void*) mr);
676-
}
677-
else if (0 == strcmp (method, MHD_HTTP_METHOD_POST) || 0 == strcmp(method, MHD_HTTP_METHOD_PUT))
676+
} */
677+
MHD_get_connection_values (connection, MHD_GET_ARGUMENT_KIND, &build_request_args, (void*) mr);
678+
/*else*/ if (0 == strcmp (method, MHD_HTTP_METHOD_POST) || 0 == strcmp(method, MHD_HTTP_METHOD_PUT))
678679
{
679680
string encoding = mr->dhr->get_header(http_utils::http_header_content_type);
680681
if (( 0 == strcmp(method, MHD_HTTP_METHOD_POST) && ((0 == strncasecmp (MHD_HTTP_POST_ENCODING_FORM_URLENCODED, encoding.c_str(), strlen (MHD_HTTP_POST_ENCODING_FORM_URLENCODED))))) && dws->post_process_enabled)

0 commit comments

Comments
 (0)