Automatic content-type insertion

Rob Mueller robm at fastmail.fm
Thu Dec 26 18:42:51 EST 2002


> > 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?

Rob





More information about the Info-cyrus mailing list