(Steve also posted and then retracted a non-working fix.)
Here's a working fix -- replace getfirstmatchingheader() by the
following:
def getfirstmatchingheader(self, name):
name = string.lower(name) + ':'
n = len(name)
list = []
hit = 0
for line in self.headers:
if hit:
if line[:1] not in string.whitespace:
break
elif string.lower(line[:n]) == name:
hit = 1
if hit:
list.append(line)
return list
--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
<URL:http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>