diff options
author | Zhao Chao <zhaochao1984@gmail.com> | 2018-01-22 22:14:32 +0800 |
---|---|---|
committer | Zhao Chao <zhaochao1984@gmail.com> | 2018-01-23 20:06:40 +0800 |
commit | 08ea56b21c25d9a8eee125bfa8379fc0ab4b879c (patch) | |
tree | 70445506e5edd958a0bcf5be5be67623e8b4e6cd /trove/common/base_wsgi.py | |
parent | 7232a2b857a023040d5027850aea3fb2ee8ba495 (diff) | |
download | trove-08ea56b21c25d9a8eee125bfa8379fc0ab4b879c.tar.gz |
Fix api exception with unicode tenant name.
There are a lot request debug logging in Trove, when some values of
headers are encoded in utf8, UnicodeEncodeError will be raised by
webob.Request. Override how webob.Request is represented will fix.
Closes-Bug: #1720121
Change-Id: I91683b8dd24262b0f643e8d2bc7886a7c03be40a
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
Diffstat (limited to 'trove/common/base_wsgi.py')
-rw-r--r-- | trove/common/base_wsgi.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/trove/common/base_wsgi.py b/trove/common/base_wsgi.py index a43016cf..da0a0275 100644 --- a/trove/common/base_wsgi.py +++ b/trove/common/base_wsgi.py @@ -41,6 +41,7 @@ from xml.parsers import expat from trove.common import base_exception from trove.common.i18n import _ +from trove.common.utils import req_to_text from trove.common import xmlutils socket_opts = [ @@ -332,6 +333,8 @@ class Request(webob.Request): raise base_exception.InvalidContentType(content_type=content_type) return content_type + __str__ = req_to_text + class Resource(object): """ |