[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: subject is deleted instead of rewritten

From: Ronan Waide
Subject: Re: subject is deleted instead of rewritten
Date: Thu, 9 Jan 2003 20:46:54 +0000

On January 9, address@hidden said:
> Same for me; I know almost no C++.  The nice thing about C++ is that as
> long as you stick to C++ types like <list>s and strings, you can simply
> destroy the SpamAssassin object and all the associated data goes away
> at the same time thanks to destructors.  No manual free()'ing lists of
> headers, etc.

And yet there was a big fix for 1.3 which involved avoiding use of
free'd memory, right? :)
> First check to see if your 'field' is the first text in 'header'.
> If it is, good.  Otherwise do the "\nField: " test as usual.

Looks plausible; I'm still thinking 

  my ( undef, $string ) = $line =~ /(^|\n)$field: ?(.*)$/

:) [my diehard Perl nature is showing]

Note, the field may not have a space after the colon (violates spec,
as far as I recall) and the field may also be wrapped to the next line
per RFC whichever-one-defines-message-formats (821?)

Might be better when building the string object in the Spamassassin
object to parse it into individual headers there and then, which can
be stored in a list, or better still a hash indexed with the header

address@hidden / Yes, it /is/ very personal of me.

AjD feels frustrated in his attempts to establish the delinitations of
  horror in puppy-burying.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]