diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e15e0c2..00d089d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -387,7 +387,7 @@ set(Boost_USE_MULTITHREADED ON) list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules") -find_package(Boost 1.70.0 REQUIRED COMPONENTS filesystem log log_setup thread +find_package(Boost 1.81.0 REQUIRED COMPONENTS filesystem log log_setup thread program_options system) # diskhash @@ -585,7 +585,7 @@ if(NANO_FUZZER_TEST) endif() if(NANO_TEST OR RAIBLOCKS_TEST) - find_package(Boost 1.70.0 REQUIRED COMPONENTS coroutine context) + find_package(Boost 1.81.0 REQUIRED COMPONENTS coroutine context) if(WIN32) if(MSVC_VERSION) if(MSVC_VERSION GREATER_EQUAL 1910) diff --git a/nano/rpc/rpc_connection.cpp b/nano/rpc/rpc_connection.cpp index 9a9b565b..f4d96be4 100644 --- a/nano/rpc/rpc_connection.cpp +++ b/nano/rpc/rpc_connection.cpp @@ -105,7 +105,7 @@ void nano::rpc_connection::parse_request (STREAM_TYPE & stream, std::shared_ptr< auto header_field_credentials_l (header_parser->get ()["nano-api-key"]); auto header_corr_id_l (header_parser->get ()["nano-correlation-id"]); auto body_parser (std::make_shared> (std::move (*header_parser))); - auto path_l (body_parser->get ().target ().to_string ()); + std::string path_l = body_parser->get ().target (); boost::beast::http::async_read (stream, buffer, *body_parser, boost::asio::bind_executor (strand, [this_l, body_parser, header_field_credentials_l, header_corr_id_l, path_l, &stream] (boost::system::error_code const & ec, size_t bytes_transferred) { if (!ec) { @@ -142,8 +142,8 @@ void nano::rpc_connection::parse_request (STREAM_TYPE & stream, std::shared_ptr< auto handler (std::make_shared (this_l->rpc_config, req.body (), request_id, response_handler, this_l->rpc_handler_interface, this_l->logger)); nano::rpc_handler_request_params request_params; request_params.rpc_version = rpc_version_l; - request_params.credentials = header_field_credentials_l.to_string (); - request_params.correlation_id = header_corr_id_l.to_string (); + request_params.credentials = header_field_credentials_l; + request_params.correlation_id = header_corr_id_l; request_params.path = boost::algorithm::erase_first_copy (path_l, api_path_l); request_params.path = boost::algorithm::erase_first_copy (request_params.path, "/"); handler->process_request (request_params);