|
|
|
@@ -38,7 +38,7 @@ request_ptr_u daemon::create_request( |
|
|
|
{ return std::make_unique<request>(p_connection, p_url, p_method, p_version); } |
|
|
|
|
|
|
|
response_ptr_u daemon::create_response( |
|
|
|
const request& p_request) |
|
|
|
request& p_request) |
|
|
|
{ return create_default_response(p_request, true); } |
|
|
|
|
|
|
|
response_ptr_u daemon::create_default_response( |
|
|
|
@@ -144,28 +144,28 @@ int daemon::mhd_access_handler_callback( |
|
|
|
{ |
|
|
|
cppmicrohttpd_log(warn) << "Error while handling post data: " << ex; |
|
|
|
req.set_error(ex); |
|
|
|
*data_size = 0; // Assume that all data has been progressed |
|
|
|
*data_size = 0; // Assume that all data has been processed |
|
|
|
return MHD_YES; |
|
|
|
} |
|
|
|
catch(const exception& ex) |
|
|
|
{ |
|
|
|
cppmicrohttpd_log(warn) << "Error while handling post data: " << ex; |
|
|
|
req.set_error(ex); |
|
|
|
*data_size = 0; // Assume that all data has been progressed |
|
|
|
*data_size = 0; // Assume that all data has been processed |
|
|
|
return MHD_YES; |
|
|
|
} |
|
|
|
catch(std::exception& ex) |
|
|
|
{ |
|
|
|
cppmicrohttpd_log(warn) << "Error while handling post data: " << ex.what(); |
|
|
|
req.set_error(exception(ex.what())); |
|
|
|
*data_size = 0; // Assume that all data has been progressed |
|
|
|
*data_size = 0; // Assume that all data has been processed |
|
|
|
return MHD_YES; |
|
|
|
} |
|
|
|
catch(...) |
|
|
|
{ |
|
|
|
cppmicrohttpd_log(warn) << "Error while handling post data: unknown"; |
|
|
|
req.set_error(exception("Unknown error")); |
|
|
|
*data_size = 0; // Assume that all data has been progressed |
|
|
|
*data_size = 0; // Assume that all data has been processed |
|
|
|
return MHD_YES; |
|
|
|
} |
|
|
|
|
|
|
|
|