diff options
| author | Ernest Allen <eallen@apache.org> | 2015-01-12 14:21:34 +0000 |
|---|---|---|
| committer | Ernest Allen <eallen@apache.org> | 2015-01-12 14:21:34 +0000 |
| commit | b04b1ab686738078e148a71ee070f2d6d9071ba0 (patch) | |
| tree | 517f984eb6e6470ba0d462bee9a6eff8339edf57 /qpid/python | |
| parent | 867446c8b99468568a9a066130b0725113d8caf8 (diff) | |
| download | qpid-python-b04b1ab686738078e148a71ee070f2d6d9071ba0.tar.gz | |
QPID-6197: Allow unicode values in connection response field
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1651102 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
| -rw-r--r-- | qpid/python/qpid/codec010.py | 3 | ||||
| -rw-r--r-- | qpid/python/qpid/sasl.py | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/qpid/python/qpid/codec010.py b/qpid/python/qpid/codec010.py index 94a1cd4263..f4dc60fcc4 100644 --- a/qpid/python/qpid/codec010.py +++ b/qpid/python/qpid/codec010.py @@ -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) diff --git a/qpid/python/qpid/sasl.py b/qpid/python/qpid/sasl.py index 85e31e3e1b..a2147e3cc4 100644 --- a/qpid/python/qpid/sasl.py +++ b/qpid/python/qpid/sasl.py @@ -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)) |
