Merge "Fix slorange on-disk format when including whole object"

This commit is contained in:
Jenkins 2015-10-06 17:16:01 +00:00 committed by Gerrit Code Review
commit bcd17c550d
2 changed files with 2 additions and 2 deletions

View File

@ -703,7 +703,7 @@ class StaticLargeObject(object):
elif len(ranges) > 1:
problem_segments.append([quote(obj_name),
'Multiple Ranges'])
elif ranges == [(0, seg_dict['size_bytes'])]:
elif ranges == [(0, head_seg_resp.content_length)]:
# Just one range, and it exactly matches the object.
# Why'd we do this again?
seg_dict['range'] = None

View File

@ -530,7 +530,7 @@ class TestSloPutManifest(SloTestCase):
def test_handle_single_ranges(self):
good_data = json.dumps(
[{'path': '/checktest/a_1', 'etag': None,
'size_bytes': 1, 'range': '0-0'},
'size_bytes': None, 'range': '0-0'},
{'path': '/checktest/b_2', 'etag': None,
'size_bytes': 2, 'range': '-1'},
{'path': '/checktest/b_2', 'etag': None,