Fixed a compatibility issue with other clients not sending application headers

This commit is contained in:
Ask Solem 2010-11-10 10:40:36 +01:00
parent 32865beb4a
commit 465c062e89
1 changed files with 9 additions and 8 deletions

View File

@ -148,14 +148,15 @@ class Message(base.Message):
""" """
def __init__(self, channel, msg, **kwargs): def __init__(self, channel, msg, **kwargs):
props = msg.properties
super(Message, self).__init__(channel, super(Message, self).__init__(channel,
body=msg.body, body=msg.body,
delivery_tag=msg.delivery_tag, delivery_tag=msg.delivery_tag,
content_type=msg.content_type, content_type=props.get("content_type"),
content_encoding=msg.content_encoding, content_encoding=props.get("content_encoding"),
delivery_info=msg.delivery_info, delivery_info=msg.delivery_info,
properties=msg.properties, properties=msg.properties,
headers=msg.application_headers, headers=props.get("application_headers"),
**kwargs) **kwargs)