23 #include "xmlrpc_processor.h"
24 #include <webview/page_reply.h>
25 #include <webview/error_reply.h>
26 #include <logging/logger.h>
28 #include <xmlrpc-c/registry.hpp>
31 using namespace fawkes;
34 #define MAX_REQUEST_LENGTH (1024*512)
56 delete __xmlrpc_registry;
65 return __xmlrpc_registry;
73 const char *upload_data,
74 size_t *upload_data_size,
77 if ( *session_data == NULL ) {
78 std::string *c =
new std::string(upload_data ? upload_data :
"");
79 *upload_data_size = 0;
83 if (*upload_data_size > 0) {
84 std::string *c = (std::string *)*session_data;
85 if ( (c->length() + *upload_data_size) > MAX_REQUEST_LENGTH ) {
92 *upload_data_size = 0;
97 std::string *call = (std::string *)*session_data;
100 if (strcmp(method,
"POST") != 0) {
103 std::string response =
"";
104 __xmlrpc_registry->processCall(*call, &response);