views:

415

answers:

1

Is there such a thing as a generic MIME type for a MIME entity? A MIME entity would be something that consists of a header section, followed by a blank line, followed by a body section (with CRLF line endings) according to RFC 2045/2046.

An example could be the following:

Header1: Some list
Header2: of headers

Arbitrary body content

In other words, is there a MIME "supertype" for things such as message/rfc822, a single multipart-part, etc.?

+1  A: 

None I know of. A single multipart part is also message/rfc822, and technically HTTP messages are not MIME entities so there is no common base between them and rfc822. Although parts of an HTTP message may be MIME entities, the actual request/response is not.

RFC2616 blurs the distinction by referencing 822-family specs in places (sometimes erroneously, for example the references to using RFC2047 for encoding parameters). But HTTP defines its own basic productions for headers and values which are slightly different from — and incompatible with — those defined in RFC[2]822. So HTTP should not be parsed using standard RFC822 tools... even disregarding the many, many ways in which real-world web browsers and servers diverge from the HTTP standards.

bobince
Thanks for the competent response! You are right in pointing out that HTTP message are not strictly MIME entities.However, multipart parts are not `message/rfc822` either as they lack the required headers (cf. RFC 2046 section 5.1 and RFC 822 section 4.1).
buge
Hmm, good point, `orig-date` and `from` are required by spec even though in practice no real-world tools care. You're right, there probably should be a MIME type for “RFC822 syntax but without any required headers”. `message/` as a major type had only such subtypes originally, but since then all sorts of other message formats have been added.
bobince