Bug in RFC822.py

Steve Kirsch (stk@infoseek.com)
28 Jul 1994 20:53:32 GMT

This module has worked fine for parsing 1000 different email addresses to our
request server so far. But one message caused an error

From: Neil Trevor Clifford <ncliffor@eleceng.ucl.ac.uk>
Message-Id: <9616.9407231636@eleceng.ucl.ac.uk>
To: request
Date: Sat, 23 Jul 1994 17:36:05 +0100 (BST)
Reply-To: n.clifford@eleceng.ucl.ac.uk
Reply-To: n.clifford@eleceng.ucl.ac.uk
X-Phone: +44 (0)71 387 7050 x 3198
X-Fax: +44 (0)71 387 4350
....

He had two "Reply-To:" fields!
so getaddr('reply-to') returned:
n.clifford@eleceng.ucl.ac.uk Reply-To: n.clifford@eleceng.ucl.ac.uk

It appears that the bug is in getfirstmatchingheader.
The easy fix is to move:
list = []
to inside the first if clause (e.g., right after "hit = 1")

-steve

---
Steven T. Kirsch 
InfoSeek Corporation
2620 Augustine Dr #250
Santa Clara, CA 95054
 
stk@infoseek.com  (408) 982-4463  FAX: (408) 986-1889