[Top] [All Lists]

Re: 'header' test and whitespace

2005-11-23 16:19:16

On Tue, Nov 22, 2005 at 12:27:38PM -0500, Barry Leiba wrote:
Both UCB mail and mutt do compress whitespace at fold points for the
overview and show all whitespace at fold points when displaying the
message, including the newline.  Both surprises me, and I do not like it.

It's that inconsistency that prompts this suggestion.  Behaviour is so 
that I'd rather see us define something predictable.

"Varied" is a nice word for what I consider a "bug".  Unfolding as
specified in RFC 2822 is easy to understand and logical to me, yet
two MUAs decide to break it in two different ways.  I agree we should
say something about it.

That said, there's Kjetil's comment:

so I don't think it matters much in practice.  so my conclusion is:
don't confuse matters even more by adding Sieve specific unfolding

There's definitely something to be said for us to just point to the RFC2822
unfolding rule, and not define our own.

You have my vote for that.

I'll be happy with whatever decision we make about the whitespace at the 
points, but I prefer compressing it to one space there.  I will NOT be happy
if we don't strip leading and trailing whitespace on the overall unfolded
field value.  Moreover, I think another important point in what I suggested
is that this stripping be done ANY TIME Sieve touches a header field value,
NOT JUST IN COMPARISONS.  If we stick the value into a variable and then
compare against the variable, the behaviour must be the same as if we
compare against the header field value directly, which means that the
leading and trailing whitespace must be stripped when the value is put into
the variable in the first place.

You lost me somewhere.  Do you mean:

Headers accessed by Sieve are always: Unfolded, stripped of heading and
trailing white space and MIME-decoded?

If so, that would make a raw header test/comparison impossible.  I suggest
that specific tests and actions define if they do the above, and I have
no problems if variable assignments do, but a requirement in the base spec
that all operations on headers must work that way sounds limiting to me.