The ec2 response layer assumed that all strings coming back for
results were always ascii, and exploded horribly if they weren't due
to the use of a str() function late in the game. This updates the code
to use safe_encode correctly when the object gets rendered.
This also adds unit tests for the rendering functionality in
ec2/apirequest so that we can actually feel confident that it does the
right things with unicode.
Reviewed: https:/ /review. openstack. org/120781 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=0da4d72ae6a ae012f2c65c928b bab013043d09a1
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0da4d72ae6aae01 2f2c65c928bbab0 13043d09a1
Author: Sean Dague <email address hidden>
Date: Thu Sep 11 08:52:43 2014 -0400
ensure that we safely encode ec2 utf8 responses
The ec2 response layer assumed that all strings coming back for
results were always ascii, and exploded horribly if they weren't due
to the use of a str() function late in the game. This updates the code
to use safe_encode correctly when the object gets rendered.
This also adds unit tests for the rendering functionality in
ec2/apirequest so that we can actually feel confident that it does the
right things with unicode.
Change-Id: I348a728e3559fd bf0d1bc66616cc2 78c3370cd29
Closes-Bug: #1306479