From fc9a3852e44b2bf1258fcb24a6c12ecfb2795f44 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Mon, 25 Jan 2016 09:25:20 -0800 Subject: [PATCH] Don't .lower() a literal It feels silly, and we don't do it for any of the other headers in headers_to_container_info. While we're at it, clean up a stray ' Change-Id: I0745038cc3832a77d064e515c37cacbdcb97c4d9 Related-Change: Iea3d06de80210e9e504e296d4572583d7ffabeac --- swift/proxy/controllers/base.py | 3 +-- test/functional/tests.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/swift/proxy/controllers/base.py b/swift/proxy/controllers/base.py index 7fc08a06e2..c2ab760cbb 100644 --- a/swift/proxy/controllers/base.py +++ b/swift/proxy/controllers/base.py @@ -169,8 +169,7 @@ def headers_to_container_info(headers, status_int=HTTP_OK): 'object_count': headers.get('x-container-object-count'), 'bytes': headers.get('x-container-bytes-used'), 'versions': headers.get('x-versions-location'), - 'storage_policy': headers.get('X-Backend-Storage-Policy-Index'.lower(), - '0'), + 'storage_policy': headers.get('x-backend-storage-policy-index', '0'), 'cors': { 'allow_origin': meta.get('access-control-allow-origin'), 'expose_headers': meta.get('access-control-expose-headers'), diff --git a/test/functional/tests.py b/test/functional/tests.py index 2ec182253a..5dabec4c7f 100644 --- a/test/functional/tests.py +++ b/test/functional/tests.py @@ -4309,7 +4309,7 @@ class TestServiceToken(unittest2.TestCase): a token from the test service user. We save options here so that do_request() can make the appropriate request. - :param method: The operation (e.g'. 'HEAD') + :param method: The operation (e.g. 'HEAD') :param use_service_account: Optional. Set True to change the path to be the service account :param container: Optional. Adds a container name to the path