Redfish:Dump offload handler implementation using nbd-proxy
This handler transfers data between nbd-client and nbd-server.
basically it invokes nbd-proxy and reads data from socket
and writes on to nbd-client and vice-versa
Change-Id: I429393a5e056647333bf4e148c0df2a5695b2a47
Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
diff --git a/http/http_request.h b/http/http_request.h
index b440f44..0dd7e35 100644
--- a/http/http_request.h
+++ b/http/http_request.h
@@ -9,11 +9,23 @@
#include "common.h"
#include "query_string.h"
+#if BOOST_VERSION >= 107000
+#include <boost/beast/ssl/ssl_stream.hpp>
+#else
+#include <boost/beast/experimental/core/ssl_stream.hpp>
+#endif
+
namespace crow
{
struct Request
{
+#ifdef BMCWEB_ENABLE_SSL
+ using Adaptor = boost::beast::ssl_stream<boost::asio::ip::tcp::socket>;
+#else
+ using Adaptor = boost::asio::ip::tcp::socket;
+#endif
+
boost::beast::http::request<boost::beast::http::string_body>& req;
boost::beast::http::fields& fields;
std::string_view url{};
@@ -28,7 +40,7 @@
std::shared_ptr<crow::persistent_data::UserSession> session;
std::string userRole{};
-
+ std::function<Adaptor&()> socket;
Request(
boost::beast::http::request<boost::beast::http::string_body>& reqIn) :
req(reqIn),