diff --git a/thrift/lib/cpp2/transport/rocket/client/RocketClient.cpp b/thrift/lib/cpp2/transport/rocket/client/RocketClient.cpp index 4a8a9aa2c0b..6d56e88f837 100644 --- a/thrift/lib/cpp2/transport/rocket/client/RocketClient.cpp +++ b/thrift/lib/cpp2/transport/rocket/client/RocketClient.cpp @@ -180,7 +180,9 @@ void RocketClient::handleFrame(std::unique_ptr frame) { ServerPushMetadata serverMeta; try { PayloadSerializer::getInstance().unpack( - serverMeta, std::move(mdPushFrame.metadata()), false); + serverMeta, + std::move(mdPushFrame.metadata()), + encodeMetadataUsingBinary_); } catch (...) { close(transport::TTransportException( transport::TTransportException::CORRUPTED_DATA, @@ -388,7 +390,7 @@ StreamChannelStatusResponse RocketClient::handleFirstResponse( } auto firstResponse = rocket::PayloadSerializer::getInstance().unpack( - std::move(fullPayload), false /* decodeMetadataUsingBinary */); + std::move(fullPayload), encodeMetadataUsingBinary_); if (firstResponse.hasException()) { serverCallback.onInitialError(std::move(firstResponse.exception())); return StreamChannelStatus::Complete; @@ -444,7 +446,7 @@ StreamChannelStatusResponse RocketClient::handleStreamResponse( if (next) { auto streamPayload = rocket::PayloadSerializer::getInstance().unpack( - std::move(fullPayload), false /* decodeMetadataUsingBinary */); + std::move(fullPayload), encodeMetadataUsingBinary_); if (streamPayload.hasException()) { return serverCallback.onStreamError(std::move(streamPayload.exception())); } @@ -513,7 +515,7 @@ StreamChannelStatusResponse RocketClient::handleSinkResponse( if (next) { auto streamPayload = rocket::PayloadSerializer::getInstance().unpack( - std::move(fullPayload), false /* decodeMetadataUsingBinary */); + std::move(fullPayload), encodeMetadataUsingBinary_); if (streamPayload.hasException()) { return serverCallback.onFinalResponseError( std::move(streamPayload.exception())); diff --git a/thrift/lib/cpp2/transport/rocket/server/RocketServerConnection.cpp b/thrift/lib/cpp2/transport/rocket/server/RocketServerConnection.cpp index f2b5410c9ca..a374dbf20bb 100644 --- a/thrift/lib/cpp2/transport/rocket/server/RocketServerConnection.cpp +++ b/thrift/lib/cpp2/transport/rocket/server/RocketServerConnection.cpp @@ -676,7 +676,7 @@ void RocketServerConnection::handleSinkFrame( if (next) { auto streamPayload = PayloadSerializer::getInstance().unpack( - std::move(*fullPayload), false /* decodeMetadataUsingBinary */); + std::move(*fullPayload), decodeMetadataUsingBinary_.value()); if (streamPayload.hasException()) { notViolateContract = clientCallback.onSinkError(std::move(streamPayload.exception()));