From 781815b3b27cc3fcbf153db57deb9bd82ae1d8d3 Mon Sep 17 00:00:00 2001 From: Rohan Rhishikesh Kanade Date: Fri, 17 May 2013 04:15:26 -0700 Subject: Fixes encoding issues for nova api req body. * Ensure utf-8 encoding for POST/PUT body for api requests * As per https://wiki.openstack.org/wiki/Encoding. Fixes bug #1180344 Change-Id: Iea0f16b0c024795fb3aee1cd38bb54ee9da6d90d --- nova/api/openstack/wsgi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nova/api') diff --git a/nova/api/openstack/wsgi.py b/nova/api/openstack/wsgi.py index 9c5f9855d..9d2f1846c 100644 --- a/nova/api/openstack/wsgi.py +++ b/nova/api/openstack/wsgi.py @@ -917,7 +917,8 @@ class Resource(wsgi.Application): if body: msg = _("Action: '%(action)s', body: " - "%(body)s") % {'action': action, 'body': body} + "%(body)s") % {'action': action, + 'body': unicode(body, 'utf-8')} LOG.debug(msg) LOG.debug(_("Calling method %s") % meth) -- cgit