[spambayes-dev] OptionsClass.is_valid too picky?

Skip Montanaro skip at pobox.com
Mon Nov 17 10:04:23 EST 2003


    Tim> [Skip]

    >> It looks to me like OptionsClass.HEADER_VALUE is too
    >> restrictive... 
    >> ...
    >> Anything printable is okay, yes?

    Tim> The colon is forbidden in a header field name.

    >> that would be [ -~]+ I think.

    Tim> The blank is also forbidden in a header field name.

    >> Do we need to worry about people including control characters or
    >> high-bit-set stuff?

    Tim> Not if people are willing to adhere to the standard <wink>.

I believe OptionsClass.HEADER_VALUE refers to the value of a particular, not
its name.  Everything you wrote is correct for OptionsClass.HEADER_NAME.
Right now, both have the same value:

    HEADER_NAME = r"[\w\.\-\*]+"
    HEADER_VALUE = r"[\w\.\-\*]+"

I am happy to leave HEADER_NAME as is, but would like to change HEADER_VALUE
to

    HEADER_VALUE = "[ -~]+"

or should that be

    HEADER_VALUE = "[\t -~]+"

?

Skip



More information about the spambayes-dev mailing list