[Top] [All Lists]

Re: NULL vs. ""

2005-05-27 04:30:17

On Fri, 2005-05-27 at 10:47 +0200, Arnt Gulbrandsen wrote:
NULL and "" should be the same.

by NULL I assume you mean "undefined" or "not present".

it's hard to make a general comment, but it's clear that is not
generally true in Sieve today.  are you proposing to change the
semantics of the header test?

   If a header listed in the header-names argument exists, it contains
   the null key ("").  However, if the named header is not present, it
   does not contain the null key.  So if a message contained the header

           X-Caffeine: C8H10N4O2

   these tests on that header evaluate as follows:

           header :is ["X-Caffeine"] [""]         => false
           header :contains ["X-Caffeine"] [""]   => true

on the other hand, in the variables extension it is impossible to
distunguish between an unset variable and a variable set to "".
Kjetil T.

<Prev in Thread] Current Thread [Next in Thread>