ietf-mta-filters
[Top] [All Lists]

Re: Stripping leading/trailing spaces in relational draft

2005-10-13 03:23:23

On Wed, Oct 12, 2005 at 06:28:32PM -0400, Mark E. Mallett wrote:
I am mostly in agreement there.  In header tests, my implementation only
strips leading spaces, but only because that is what I believed a script
writer would expect (and, as I mentioned before, is the only way some of
the examples could work).  I could probably get on board with stripping
trailing spaces from header tests for consistency's sake, but do not do
it at present.

Ok, so are there any votes against stripping leading white space on
header tests? I don't see agreement on how to treat trailing space
yet, but that's a different issue.

Unfortunately I can envision a situation where a script writer might want
to test for sequences of leading and, particularly, trailing spaces.
But you can't really have it both ways without adding some kind of other
options.

Indeed, and you can not test for the white space between the header
name and the colon either.  I guess that needs a new test operating on
raw headers.

As for address elements, I believe I am stripping whitespace only if the
address is not in anglebrackets, but if anglebrackets are present, am
taking the interior as the literal string.  Kjetil's comments about
address canonicalization for the tests are interesting though; I had
thought of the address test as a string comparison against the character
strings found in the message header, not as a semantic test (i.e. against
what the address means).  But that interpretation has a lot of appeal
and I am at the moment inclined to change.

Note that the base spec requires to strip comments within addresses.
But indeed it is not clearly spelled out that e.g. quoted local parts
are to be matched unquoted.  Yet another change to the base spec.  We
discussed that before, but that might have got lost.

If white space
is stripped on the left side (message value), it should be stripped on the
right side (literal) the same way, but that is an independent issue.

I agree with the last part, but not the first :-)  I think that the
space-stripping conversation should be focused on the test inputs that
the script writer doesn't explicitly control, i.e. to the inputs that
are supplied by the implementation "from the message."  If the script writer
supplies a literal with spaces in it, and it doesn't make sense, well
that's a script bug.  The script writer has the ability to repair that
mistake.

You have a point there.

Ditto.  But your description of your implementation seems to contradict
your belief (quoted above) that spaces should be stripped from literal
strings if they have been stripped from another input to the test.
Do I misunderstand?

Oops.  No.  I guess I thought "if it doesn't say it strips trailing
space, it should be kept" and reading your answer above, I agree that
it is really better that way.

I like symmetry a lot, but get carried away with it sometimes.

Michael