diff options
| -rw-r--r-- | src/rabbit_binary_generator.erl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/rabbit_binary_generator.erl b/src/rabbit_binary_generator.erl index f7a3409006..056ab1b574 100644 --- a/src/rabbit_binary_generator.erl +++ b/src/rabbit_binary_generator.erl @@ -283,7 +283,16 @@ ensure_content_encoded(Content = #content{properties_bin = PropBin, protocol = Protocol}, Protocol) when PropBin =/= none -> Content; -ensure_content_encoded(Content = #content{properties = Props}, Protocol) -> +ensure_content_encoded(Content = #content{properties = none, + properties_bin = PropBin, + protocol = Protocol}, Protocol1) + when PropBin =/= none -> + Props = Protocol:decode_properties(Content#content.class_id, PropBin), + Content#content{properties = Props, + properties_bin = Protocol1:encode_properties(Props), + protocol = Protocol1}; +ensure_content_encoded(Content = #content{properties = Props}, Protocol) + when Props =/= none -> Content#content{properties_bin = Protocol:encode_properties(Props), protocol = Protocol}. |
