diff options
| author | Matthias Radestock <matthias@lshift.net> | 2009-08-09 01:04:41 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2009-08-09 01:04:41 +0100 |
| commit | 6ee16c0ca187c31fd994a2ef3e4800ffefe114b0 (patch) | |
| tree | 517c2cd25b2b287c4d52bb6b6d0d51678c01b292 | |
| parent | 0170a7f3914bce82a70062e4c87f97aa32e1fee0 (diff) | |
| download | rabbitmq-server-git-6ee16c0ca187c31fd994a2ef3e4800ffefe114b0.tar.gz | |
assemble fragments in correct order
and handle the case where both props are available in both binary and
decoded form.
| -rw-r--r-- | src/rabbit_basic.erl | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/rabbit_basic.erl b/src/rabbit_basic.erl index 0f6aeb7ad7..4033aaafda 100644 --- a/src/rabbit_basic.erl +++ b/src/rabbit_basic.erl @@ -82,17 +82,13 @@ build_content(Properties, BodyBin) -> properties_bin = none, payload_fragments_rev = [BodyBin]}. -from_content(#content{properties = Props, - properties_bin = none, - payload_fragments_rev = BodyList}) -> - {Props, list_to_binary(BodyList)}; - -from_content(#content{properties = none, - properties_bin = PropsBin, - payload_fragments_rev = BodyList}) -> +from_content(Content) -> + #content{class_id = ClassId, + properties = Props, + payload_fragments_rev = FragmentsRev} = + rabbit_binary_parser:ensure_content_decoded(Content), {ClassId, _MethodId} = rabbit_framing:method_id('basic.publish'), - Props = rabbit_framing:decode_properties(ClassId, PropsBin), - {Props, list_to_binary(BodyList)}. + {Props, list_to_binary(lists:reverse(FragmentsRev))}. message(ExchangeName, RoutingKeyBin, RawProperties, BodyBin) -> Properties = properties(RawProperties), |
