qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eal...@apache.org
Subject svn commit: r1651102 - in /qpid/trunk/qpid/python/qpid: codec010.py sasl.py
Date Mon, 12 Jan 2015 14:21:34 GMT
Author: eallen
Date: Mon Jan 12 14:21:34 2015
New Revision: 1651102

URL: http://svn.apache.org/r1651102
Log:
QPID-6197: Allow unicode values in connection response field

Modified:
    qpid/trunk/qpid/python/qpid/codec010.py
    qpid/trunk/qpid/python/qpid/sasl.py

Modified: qpid/trunk/qpid/python/qpid/codec010.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/codec010.py?rev=1651102&r1=1651101&r2=1651102&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/codec010.py (original)
+++ qpid/trunk/qpid/python/qpid/codec010.py Mon Jan 12 14:21:34 2015
@@ -225,6 +225,9 @@ class Codec(Packer):
   def write_vbin32(self, b):
     if isinstance(b, buffer):
       b = str(b)
+    # Allow unicode values in connection 'response' field
+    if isinstance(b, unicode):
+      b = b.encode('utf8')
     self.write_uint32(len(b))
     self.write(b)
 

Modified: qpid/trunk/qpid/python/qpid/sasl.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/sasl.py?rev=1651102&r1=1651101&r2=1651102&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/sasl.py (original)
+++ qpid/trunk/qpid/python/qpid/sasl.py Mon Jan 12 14:21:34 2015
@@ -28,6 +28,9 @@ class WrapperClient:
     self._cli = _Client()
 
   def setAttr(self, name, value):
+    # Allow unicode user names and passwords
+    if isinstance(value, unicode):
+      value = value.encode('utf8')
     status = self._cli.setAttr(str(name), str(value))
     if status and name == 'username':
       status = self._cli.setAttr('externaluser', str(value))



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message