def test_s3_get_response_headers(self):
    bucket_name = ('test-bucket-%s' % short_uid())
    client = self._get_test_client()
    client.create_bucket(Bucket=bucket_name)
    object_key = 'key-by-hostname'
    client.put_object(Bucket=bucket_name, Key=object_key, Body='something')
    client.put_bucket_cors(Bucket=bucket_name, CORSConfiguration={'CORSRules': [{'AllowedMethods': ['GET', 'PUT', 'POST'], 'AllowedOrigins': ['*'], 'ExposeHeaders': ['ETag', 'x-amz-version-id']}]})
    url = client.generate_presigned_url('get_object', Params={'Bucket': bucket_name, 'Key': object_key})
    response = requests.get(url, verify=False)
    self.assertEquals(response.headers['Access-Control-Expose-Headers'], 'ETag,x-amz-version-id')
    self._delete_bucket(bucket_name, [object_key])
def test_s3_get_response_headers(self):
    bucket_name = ('test-bucket-%s' % short_uid())
    client = self._get_test_client()
    client.create_bucket(Bucket=bucket_name)
    object_key = 'key-by-hostname'
    client.put_object(Bucket=bucket_name, Key=object_key, Body='something')
    client.put_bucket_cors(Bucket=bucket_name, CORSConfiguration={'CORSRules': [{'AllowedMethods': ['GET', 'PUT', 'POST'], 'AllowedOrigins': ['*'], 'ExposeHeaders': ['ETag', 'x-amz-version-id']}]})
    url = client.generate_presigned_url('get_object', Params={'Bucket': bucket_name, 'Key': object_key})
    response = requests.get(url, verify=False)
    self.assertEquals(response.headers['Access-Control-Expose-Headers'], 'ETag,x-amz-version-id')
    self._delete_bucket(bucket_name, [object_key])