Don't raise HTTPForbidden on a multitenant environment
When getting public images in a multi-tenant environment, Swift raises HTTPForbidden for chuncked images. Based on swift documentation, rlistings directive turns listings on, which is the desired behavior in this case. Fixes bug 1170156 Change-Id: I149f702d5b3ebae73b04deed4809939ab43c6adc
This commit is contained in:
parent
3acd2a58d2
commit
2d492e04be
|
@ -614,7 +614,7 @@ class MultiTenantStore(BaseStore):
|
|||
|
||||
headers = {}
|
||||
if public:
|
||||
headers['X-Container-Read'] = ".r:*"
|
||||
headers['X-Container-Read'] = ".r:*,.rlistings"
|
||||
elif read_tenants:
|
||||
headers['X-Container-Read'] = ','.join(read_tenants)
|
||||
else:
|
||||
|
|
|
@ -607,7 +607,8 @@ class SwiftTests(object):
|
|||
store.set_acls(loc, public=True)
|
||||
container_headers = swiftclient.client.head_container('x', 'y',
|
||||
'glance')
|
||||
self.assertEqual(container_headers['X-Container-Read'], ".r:*")
|
||||
self.assertEqual(container_headers['X-Container-Read'],
|
||||
".r:*,.rlistings")
|
||||
|
||||
def test_read_acl_tenants(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue