"Randy W. Sims" wrote:

> On 3/27/2004 2:23 AM, R. Joseph Newton wrote:
> > These lines should probably be going into a hash,
> > keyed to the portion of the line before the colon.
>
> Don't forget that some header fields can appear more than once.
>
> Regards,
> Randy.

Actually, I'm pretty sure it is only the Received header that would ever show
more than once in the main header of a message.
[Content-type and related part-specific lines might show up more than once, but
only once per part.] That would take some special handling. I think the factor
to put to use for Received headers specifically is that their ordering is
consistent.  So each Received line encountered should be pushed into an array,
perhaps.  Then the lines could be popped to retrace the route from origin to
destination.

So it is not quite that simple.  Still, it is not inordinately complicated
either.  Good design, with small, well-designed subroutines, should make it
fairly straightforward.

Joseph



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to