Set path_info in sub_slo manifest GET requests
The new_req Request object created for fetching nested sub_slo manifests does not have its path_info set to the sub_slo path before being passed to GETorHEAD_base. The sub manifest GET works fine because GETorHEAD_base uses its path argument (not req.path) to set up its connection, BUT if an exception is thrown, GETorHEAD_base uses req.path to construct the log message - so the exception log would have the wrong path. Fixes bug 1231872 Change-Id: I0f0f969958f814d8a7053440d9de4e50796169e4
This commit is contained in:
parent
c1f9f668ee
commit
8ab06eb8cc
@ -417,6 +417,7 @@ class ObjectController(Controller):
|
||||
new_req = incoming_req.copy_get()
|
||||
new_req.method = 'GET'
|
||||
new_req.range = None
|
||||
new_req.path_info = '/'.join(['', account, container, obj])
|
||||
if partition is None:
|
||||
try:
|
||||
partition = self.app.object_ring.get_part(
|
||||
@ -427,7 +428,7 @@ class ObjectController(Controller):
|
||||
new_req.path)
|
||||
valid_resp = self.GETorHEAD_base(
|
||||
new_req, _('Object'), self.app.object_ring, partition,
|
||||
'/'.join(['', account, container, obj]))
|
||||
new_req.path_info)
|
||||
|
||||
if 'swift.authorize' in incoming_req.environ:
|
||||
incoming_req.acl = valid_resp.headers.get('x-container-read')
|
||||
|
Loading…
Reference in New Issue
Block a user