It is certainly true that getallmatchingheaders is broken... because the data it is looking at has changed format.
Here is a replacement that is as compatible as can be, based on the changed format.
name = name.lower()
n = len(name)
lst = []
for line, data in self.items():
if line.lower() == name:
lst.append(line + ': ' + data)
return lst
The changed format has merged continuation lines, and separated keys and values into a list of duplet tuples. Iterators keys, values, and items exist, keys are not necessarily unique.