def getfirstmatchingheader(self, name):
name = name.lower() + '<STR_LIT::>'<EOL>n = len(name)<EOL>lst = []<EOL>hit = <NUM_LIT:0><EOL>for line in self.headers:<EOL><INDENT>if hit:<EOL><INDENT>if not line[:<NUM_LIT:1>].isspace():<EOL><INDENT>break<EOL><DEDENT><DEDENT>elif line[:n].lower() == name:<EOL><INDENT>hit = <NUM_LIT:1><EOL><DEDENT>if hit:<EOL><INDENT>lst.append(line)<EOL><DEDENT><DEDENT>return lst<EOL>
Get the first header line matching name.

        This is similar to getallmatchingheaders, but it returns only the
        first matching header (and its continuation lines).