On Wed, Oct 05, 2005 at 04:11:40PM +0200, Kjetil Torgrim Homme wrote:
On Wed, 2005-10-05 at 14:26 +0200, Michael Haardt wrote:
There is still the yet unanswered question if leading or trailing white
space on the right side is an error, as it could never be matched by
any argument on the left side and is likely a mistake.
you're assuming only "eq" or "ne". for "lt" the trailing whitespace
will be significant.
Yes, and very confusing so, given X-field: a
if header :value "gt" :comparator ["x-field"] ["a "]
the test is true. But I agree it may be desired for anything but "eq"
and "ne", so I suggest the following example:
require "relational";
if header :value "eq" "X-field" "trailing space " {
# the above test never succeeds, because trailing spaces are
# removed from the left side, see section 3.1. Use :is
# instead.
}
That should illustrate the problem.
Michael