'Converts the manifest data to match with the format
that was put in through ?multipart-manifest=put
:param resp_headers: response headers
:param resp_iter: a response iterable'

def convert_segment_listing(self, resp_headers, resp_iter):

    segments = self._get_manifest_read(resp_iter)
    for seg_dict in segments:
        seg_dict.pop('content_type', None)
        seg_dict.pop('last_modified', None)
        seg_dict.pop('sub_slo', None)
        seg_dict['path'] = seg_dict.pop('name', None)
        seg_dict['size_bytes'] = seg_dict.pop('bytes', None)
        seg_dict['etag'] = seg_dict.pop('hash', None)
    json_data = json.dumps(segments)
    if six.PY3:
        json_data = json_data.encode('utf-8')
    new_headers = []
    for (header, value) in resp_headers:
        if (header.lower() == 'content-length'):
            new_headers.append(('Content-Length', len(json_data)))
        else:
            new_headers.append((header, value))
    self._response_headers = new_headers
    return [json_data]
