From 750684f7543488a25bf68406bc7c5f6d9bc7fc7c Mon Sep 17 00:00:00 2001 From: David Goetz Date: Fri, 26 Jul 2013 10:00:33 -0700 Subject: [PATCH] add utf-8 charset to multipart-manifest=get resp Change-Id: Ic06e8b07a4db4ccde633f3b56a49f198cdd467cb --- swift/proxy/controllers/obj.py | 1 + test/unit/proxy/test_server.py | 1 + 2 files changed, 2 insertions(+) diff --git a/swift/proxy/controllers/obj.py b/swift/proxy/controllers/obj.py index 306f8cb304..36c32b5bec 100644 --- a/swift/proxy/controllers/obj.py +++ b/swift/proxy/controllers/obj.py @@ -520,6 +520,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 de0f1dc350..b684911093 100644 --- a/test/unit/proxy/test_server.py +++ b/test/unit/proxy/test_server.py @@ -1274,6 +1274,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,