diff --git a/swift/proxy/controllers/obj.py b/swift/proxy/controllers/obj.py index 9cc30caf2e..af65650426 100644 --- a/swift/proxy/controllers/obj.py +++ b/swift/proxy/controllers/obj.py @@ -521,6 +521,7 @@ class ObjectController(Controller): 'X-Copy-From' not in req.headers and \ self.app.allow_static_large_object: resp.content_type = 'application/json' + resp.charset = 'utf-8' if config_true_value(resp.headers.get('x-static-large-object')) and \ req.params.get('multipart-manifest') != 'get' and \ diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py index eaff66cc44..97e3643647 100644 --- a/test/unit/proxy/test_server.py +++ b/test/unit/proxy/test_server.py @@ -1275,6 +1275,7 @@ class TestObjectController(unittest.TestCase): self.assertEqual(resp.status_int, 200) self.assertEqual(resp.body, json_listing) self.assertEqual(resp.content_type, 'application/json') + self.assertEqual(resp.charset.lower(), 'utf-8') self.assertEqual( requested,