summaryrefslogtreecommitdiff
path: root/src/rabbit_basic.erl
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2010-07-09 11:56:10 +0100
committerSimon MacMullen <simon@rabbitmq.com>2010-07-09 11:56:10 +0100
commit10bbf7e7bd0afb04ddf0bfc240b2f03f06c24283 (patch)
tree7c62275f592c0f0c47d1e63aabf44e55a576ba5a /src/rabbit_basic.erl
parent02d0fa2f5d69b916bc62351a65b809b37c2324ed (diff)
downloadrabbitmq-server-10bbf7e7bd0afb04ddf0bfc240b2f03f06c24283.tar.gz
Store protocol with encoded properties, use it to transcode if needed.
Diffstat (limited to 'src/rabbit_basic.erl')
-rw-r--r--src/rabbit_basic.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rabbit_basic.erl b/src/rabbit_basic.erl
index 4a1d50df..357333a9 100644
--- a/src/rabbit_basic.erl
+++ b/src/rabbit_basic.erl
@@ -86,16 +86,16 @@ build_content(Properties, BodyBin) ->
#content{class_id = ClassId,
properties = Properties,
properties_bin = none,
+ protocol = rabbit_framing_amqp_0_9_1,
payload_fragments_rev = [BodyBin]}.
from_content(Content) ->
#content{class_id = ClassId,
properties = Props,
payload_fragments_rev = FragmentsRev} =
- %% basic.publish hasn't changed so we can just hard-code amqp_0_9_1
- rabbit_binary_parser:ensure_content_decoded(Content,
- rabbit_framing_amqp_0_9_1),
+ rabbit_binary_parser:ensure_content_decoded(Content),
{ClassId, _MethodId} =
+ %% basic.publish hasn't changed so we can just hard-code amqp_0_9_1
rabbit_framing_amqp_0_9_1:method_id('basic.publish'),
{Props, list_to_binary(lists:reverse(FragmentsRev))}.