spf-discuss
[Top] [All Lists]

Re: When does the record end?

2005-07-19 14:43:42
Scott Kitterman wrote:

| Implementations MAY choose to parse the entire record first
| and return "PermError" if the record is not syntactically
| well formed.

In other words it's okay to evaluate a record left to right,
it's also okay to parse it first, and then try to match left
to right.

| However, in all cases, any syntax errors anywhere in the
| record MUST be detected.

Whatever you do, if you got no match before the "moo" you MUST
report a PermError.  You cannot ignore or skip "moo" if you're
at it.

I know that I MUST detect all syntax errors anywhere in the
record, but I'm not 100% sure what in the record means...

It means either "while you parse it" (the MAY case) or "while
you try to match" (the corresponding MAYbe not).

With the second strategy you never see the "moo" behind "all",
and so you won't throw an error.  With the first strategy it's
clear that "moo" is no unknown modifier (no "="), therefore it
is unknown garbage => PermError.

Is there any kind of risk associated with terminating
processing of a record once all mechanisms/modifiers have
been evaluated?

For a validator, yes, you _want_ to catch this "moo", because
some implementations MAY handle it as a PermError.  Bye, Frank