diff --git a/swift/common/middleware/swift3.py b/swift/common/middleware/swift3.py index f6a5126693..61cfa86eb6 100644 --- a/swift/common/middleware/swift3.py +++ b/swift/common/middleware/swift3.py @@ -139,11 +139,9 @@ class ServiceController(Controller): return get_err_response('InvalidURI') containers = loads(''.join(list(body_iter))) - resp = Response(content_type='text/xml') - resp.status = 200 # we don't keep the creation time of a backet (s3cmd doesn't # work without that) so we use something bogus. - resp.body = '' \ + body = '' \ '' \ '%s' \ @@ -151,6 +149,7 @@ class ServiceController(Controller): % ("".join(['%s' \ '2009-02-03T16:45:09.000Z' % xml_escape(i['name']) for i in containers])) + resp = Response(status=200, content_type='text/xml', body=body) return resp