Automatic content-type insertion

Ken Murchison ken at oceana.com
Fri Dec 27 09:36:48 EST 2002



Rob Mueller wrote:
> 
> > > I'm just wondering why cyrus automatically adds a content type charset
> to
> > > every message, even if none is specified in the message itself. For
> > > example:
> > [...]
> > > So there's no "Content-Type" line in the message, but the bodystructure
> > > has given it an implicit charset of us-ascii. Now, I know that this is
> > > technically true, but unfortunately, there seem to be quite a few broken
> > > iso-2022-jp messages out there which don't actually specify the charset
> in
> > > the header. What we allow on our site is a 'default charset', which is
> > > used if no charset is available, which would work fine in this
> situation.
> > > Unfortunately in this case, there's no indication that the ("CHARSET"
> > > "us-ascii") response was auto-generated, rather than explicitly set.
> >
> > It does this because that's what the IMAP spec says to do. Section 7.4.2:
> >
> > >       BODYSTRUCTURE
> > >          A parenthesized list that describes the [MIME-IMB] body
> > >          structure of a message.  This is computed by the server by
> > >          parsing the [MIME-IMB] header fields, defaulting various fields
> > >          as necessary.
> >
> > > The main solutions I see are:
> > > 1. Remove the implicit setting of the charset if none supplied
> 
> 'defaulting various fields as necessary' seems an awfully broad statement.
> Where does it specify which fields should be defaulted?


The IMAP spec doesn't explicitly state this, but the referenced RFCs for
the given fields (2045 in this case) give defaults.

-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp




More information about the Info-cyrus mailing list