ietf-822
[Top] [All Lists]

Re: content-type: text/plain; magic=on; magic=off

2004-06-11 23:04:48


----- Original Message ----- 
From: "Arnt Gulbrandsen" <arnt(_at_)gulbrandsen(_dot_)priv(_dot_)no>
To: <ietf-822(_at_)imc(_dot_)org>
Sent: Friday, May 28, 2004 6:45 AM
Subject: content-type: text/plain; magic=on; magic=off



Hi,

if a message has the content-type field mentioned in the subject, which
seems valid as far as I can tell, then which setting wins? Should a
compliant mail reader enable or disable magic while reading such a
message?

In my view, it would depend on the parsing logic by the mail reader.

In general programming, you would normally see two types of methods:

1) Keyword searching,
2) Parsing of the each part.

In keyword searching, a string lookup for "magic=" might be done.  In this
case, the first magic is found.  So for #1, the result would be magic=on.
I wouldn't expect it to look for "magic" again.

For #2, it reads each part.  As it parses, it sees  magic and sets a
boolean, then it continues and sees magic again.

Well, what happens next probably depends on many specifics, but in general,
it would probably override that first one.  So for #2, magic=off.

In my programming experience,  you would hardly ever see something that
says,

     if magic is already set, then don't set it again.

But then again, that might depend on whether the logic allowed for it or
might expect it because of some specification bug or server bug, etc.  For
example, is this was a file name extract?

     if filename already set, then don't set it again.

So in my view, it depends on how the mail reader is handing the
interpretation.

If you ask me what are the odds the first value prevails, I would say higher
than the last one. But you can't rely on this and you can't use "standards"
to fix the bug for you because I can see a variety of proper parsing code
that may or may not handle this situation.  If it expected this type of
logic is common place, then I would say this would put more weight towards
the first value prevailing because of the "if already set, don't set again"
logic.

Hope this helps.

-- 
Hector Santos, Santronics Software, Inc.
http://www.santronics.com



<Prev in Thread] Current Thread [Next in Thread>
  • Re: content-type: text/plain; magic=on; magic=off, Hector Santos <=