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 | f8f7a0f545c332ded3a81f908b08869d78eea841 (patch) | |
| tree | f373a41ae652b5d834ddfb2c3e25ed0791f63fa7 /python | |
| parent | 9c2f358fa65d74e3187974d37130a9c5ee0cc973 (diff) | |
| download | qpid-python-f8f7a0f545c332ded3a81f908b08869d78eea841.tar.gz | |
QPID-6197: Allow unicode values in connection response field
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1651102 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
| -rw-r--r-- | python/qpid/codec010.py | 3 | ||||
| -rw-r--r-- | python/qpid/sasl.py | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/python/qpid/codec010.py b/python/qpid/codec010.py index 94a1cd4263..f4dc60fcc4 100644 --- a/python/qpid/codec010.py +++ b/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/python/qpid/sasl.py b/python/qpid/sasl.py index 85e31e3e1b..a2147e3cc4 100644 --- a/python/qpid/sasl.py +++ b/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)) |
