Author: rhs
Date: Thu Nov 12 19:19:44 2009
New Revision: 835509

URL: http://svn.apache.org/viewvc?rev=835509&view=rev
Log:
switched SUBJECT and TO to use a qpid prefix

Modified:
    qpid/trunk/qpid/python/qpid/driver.py

Modified: qpid/trunk/qpid/python/qpid/driver.py
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/driver.py?rev=835509&r1=835508&r2=835509&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/driver.py (original)
+++ qpid/trunk/qpid/python/qpid/driver.py Thu Nov 12 19:19:44 2009
@@ -123,6 +123,9 @@
 EMPTY_DP = DeliveryProperties()
 EMPTY_MP = MessageProperties()
 
+SUBJECT = "qpid.subject"
+TO = "qpid.to"
+
 class Driver:
 
   def __init__(self, connection):
@@ -739,11 +742,11 @@
     if msg.subject is not None:
       if mp.application_headers is None:
         mp.application_headers = {}
-      mp.application_headers["subject"] = msg.subject
+      mp.application_headers[SUBJECT] = msg.subject
     if msg.to is not None:
       if mp.application_headers is None:
         mp.application_headers = {}
-      mp.application_headers["to"] = msg.to
+      mp.application_headers[TO] = msg.to
     if msg.durable:
       dp.delivery_mode = delivery_mode.persistent
     enc, dec = get_codec(msg.content_type)
@@ -787,8 +790,8 @@
     msg = Message(content)
     msg.id = mp.message_id
     if ap is not None:
-      msg.to = ap.get("to")
-      msg.subject = ap.get("subject")
+      msg.to = ap.get(TO)
+      msg.subject = ap.get(SUBJECT)
     msg.user_id = mp.user_id
     if mp.reply_to is not None:
       msg.reply_to = reply_to2addr(mp.reply_to)



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscr...@qpid.apache.org

Reply via email to