Fix http2 payloads
d547d8d2c30a7d00852855da8ecc15c0cc424b0e caused a minor regression in a
poorly executed merge conflict. The reqReader instance never gets
initialized, so all payloads now fail.
Tested: Redfish service validator modified to use http2 now succeeds
when using http/2.
Change-Id: If00f5bc1d1a70396171eddd6a643fbd860e8508c
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/http/http2_connection.hpp b/http/http2_connection.hpp
index 8416ff7..d5f4481 100644
--- a/http/http2_connection.hpp
+++ b/http/http2_connection.hpp
@@ -298,9 +298,9 @@
thisStream->second.reqReader;
if (!reqReader)
{
- BMCWEB_LOG_ERROR("No reader init {}", streamId);
- close();
- return -1;
+ reqReader.emplace(
+ bmcweb::HttpBody::reader(thisStream->second.req.req.base(),
+ thisStream->second.req.req.body()));
}
boost::beast::error_code ec;
reqReader->put(boost::asio::const_buffer(data, len), ec);