def _dissect_headers(obj, s):
    first_line, headers, body = _parse_headers(s)
    for f in obj.fields_desc:
        canonical_name = _canonicalize_header(f.name)
        try:
            header_line = headers[canonical_name]
        except:
            continue
        key, value = header_line.split(':', 1)
        obj.setfieldval(f.name,  value.strip())
        del headers[canonical_name]
    if headers:
        obj.setfieldval(
            'Additional-Headers', '\r\n'.join(headers.values()) + '\r\n')
    return first_line, body
Takes a HTTP packet as the string s, and populates the scapy layer obj
dataset/ETHPy150Open catalyst256/gobbler/gobbler/layers/http.py/_dissect_headers