Beispiel #1
0
def extract_headers_meta(headers):
    meta = {}
    for k in chunk_headers.iterkeys():
        try:
            meta[k] = headers[chunk_headers[k]]
        except KeyError as e:
            # 'content_chunksnb' is optional
            if k != 'content_chunksnb':
                raise e

    return meta
Beispiel #2
0
def extract_headers_meta(headers):
    meta = {}
    for k in chunk_headers.iterkeys():
        try:
            meta[k] = headers[chunk_headers[k]]
        except KeyError as e:
            # 'content_chunksnb' is optional
            if k != 'content_chunksnb':
                raise e

    return meta
Beispiel #3
0
def extract_headers_meta(headers):
    meta = {}
    for k in chunk_headers.iterkeys():
        meta[k] = headers[chunk_headers[k]]
    return meta