RFC 1049

Content-type header field for Internet messages

๐Ÿ“… published March 1988, from ietf

RFC 1049: A CONTENT-TYPE HEADER FIELD FOR INTERNET MESSAGES ๐Ÿ’–

Okay bestie, the title block is giving old-school ARPA-era energy ๐Ÿงš. This one's written by M. Sirbu from CMU (Carnegie Mellon University), it's dated March 1988, and it lives in the Network Working Group series. The header doesn't list a category, and it doesn't say what it obsoletes or updates, so I'm not gonna make stuff up ๐Ÿ™ˆ. What it does say is that it's a bunch of proposed additions to RFC-822, and it's begging for discussion ๐Ÿ—ฃ๏ธ.


Status of This Memo โœจ

Okay so this RFC is suggesting new stuff for the Internet Mail Protocol, which is RFC-822 ๐Ÿ“ฌ. It's built for the whole Internet community, and it literally requests discussion and suggestions for improvements ๐Ÿ’…. Also, distribution of this memo is unlimited, so share it with everyone ๐ŸŒˆ.

Abstract ๐ŸŒธ

Okay so a standardized Content-type field lets mail reading systems automatically figure out what kind of structured message body they're looking at, then process it for display accordingly ๐ŸŽ€. The structured message body must still conform to the RFC-822 requirements about which characters are allowed ๐Ÿ“. A mail reading system need not take any specific action when it gets a message with a valid Content-Type header field, which is so chill ๐Ÿซถ. Being able to recognize this field and invoke the right display process will, however, make messages way more readable โœจ, and it lets people swap messages with mathematical symbols or foreign language characters ๐Ÿงฎ๐ŸŒ.

Table of Contents ๐Ÿงš

   1. Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 1
   2. Problems with Structured Messages . . . . . . . . . . . . . . . 3
   3. The Content-type Header Field . . . . . . . . . . . . . . . . . 5
        3.1. Type Values  . . . . . . . . . . . . . . . . . . . . . . 5
        3.2. Version Number . . . . . . . . . . . . . . . . . . . . . 6
        3.3. Resource Reference . . . . . . . . . . . . . . . . . . . 6
        3.4. Comment. . . . . . . . . . . . . . . . . . . . . . . . . 7
   4. Conclusion  . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1. Introduction ๐Ÿฆ‹

Okay recap bestie: according to RFC-822, [2], an email has a bunch of defined header fields ๐Ÿ“‡. Some of those fields hold structured info, like dates and addresses, and the message body is just an unstructured string of ASCII characters ๐Ÿ”ค.

The internet mail system has been so successful that people want to send around info with way more structure, but they still have to stay inside that limited character set ๐Ÿ˜ฉ. A prime example is sending a document with embedded TROFF formatting commands. A more sophisticated one would be a message body encoded in a Page Description Language (PDL) like Postscript ๐Ÿ–จ๏ธ. In both cases, just mapping the ASCII characters to the screen or printer the usual way won't give you the document image the sender meant. You need an extra processing step to actually produce the image of the message text on a display device or a piece of paper ๐Ÿ’€.

In both of these examples, the message body only has the legal character set, but the content has a structure that produces some awesome result after the recipient processes it ๐Ÿ”ฅ. If a message header field could say what structuring technique is used in the body, then a sophisticated mail system could use that field to automatically kick off the right processing. For example, a header field saying the body was encoded using Postscript could tell a mail system running under Sun Microsystem's NEWS window manager to process the Postscript and produce the correct page image on the screen ๐Ÿ–ฅ๏ธ.

Private header fields (the ones beginning with "X-") are already doing this for some systems, like the Andrew Message System developed at Carnegie Mellon University ๐ŸŽ“. But if this gets widespread, everyone needs to agree on the name and the allowed parameter values for a header field used for this purpose ๐Ÿค.

So we're proposing a new header field, Content-type:, to be recognized as the standard field for showing the structure of the message body ๐Ÿ‘‘. The contents of the Content-Type: field are parameters that specify what type of structure is used in the message body ๐ŸŽ€.

Note that we're not proposing that the message body contain anything other than ASCII characters, as RFC-822 specifies ๐Ÿ™…โ€โ™€๏ธ. Whatever structuring is in the message body must be represented using only the allowed ASCII characters. So this proposal should have no impact on existing mailers, only on mail reading systems ๐Ÿ’–.

At the same time, this restriction rules out more general structuring techniques like Abstract Syntax Notation (CCITT Recommendation X.409), as used in the X.400 messaging standard, because those are octet-oriented ๐Ÿšซ.

This isn't the first proposal for structuring message bodies. RFC-767 talks about a proposed technique for structuring multi-media mail messages ๐ŸŽฌ. We're also aware that lots of users already use mail to send TROFF, SCRIBE, TEX, Postscript, or other structured info ๐Ÿ“ค. Any postprocessing needed has to be invoked manually by the recipient, who looks at the text displayed as plain ASCII, realizes it's structured in some way, and then does the extra processing to render it properly ๐Ÿ˜ญ. Our proposal is designed to make that automatic, so the mail reading system does the work โœจ.

2. Problems with Structured Messages ๐Ÿ’…

Okay so once we say a message body might need processing beyond just painting the characters to the screen, we start raising a bunch of big questions ๐Ÿคฏ. These come up because some receiving systems will have the facilities to process the message and some won't. The problem is what to do when systems have different levels of capability ๐Ÿ™ƒ.

First, the whole point of structured messages is to send types of information that are meant for humans but can't be expressed in plain ASCII ๐ŸŒธ. So there's no way in plain ASCII to send the italics, boldface, or Greek characters that Postscript can express. If some different processing is needed to render these glyphs, then that's the minimum price to pay to send them at all ๐Ÿ’ธ.

Second, by insisting that the message body contain only ASCII, we make sure it won't "break" current mail reading systems that can't process the structure ๐Ÿ›ก๏ธ. The result on the screen might still be totally unreadable for the human, though ๐Ÿ˜ตโ€๐Ÿ’ซ.

If a message sender knows the recipient can't process Postscript, they may prefer to revise the message and skip the italics and boldface, rather than send something that looks incomprehensible ๐Ÿ™ˆ. If Postscript is being used because the message has passages in Greek, there may be no suitable ASCII equivalent, though ๐Ÿ‡ฌ๐Ÿ‡ท.

Ideally, the details of structuring the message (or not) to match the recipient system's capabilities could be completely hidden from the sender ๐Ÿซฅ. The distributed Internet mail system would somehow figure out the recipient's capabilities and convert the message automatically. Or, if there's no way to send Greek text in ASCII, it would tell the sender their message couldn't be transmitted ๐Ÿšซ๐Ÿ“จ.

In practice, this is a hard task. There are three possible approaches:

  1. Each mail system maintains a database of the capabilities of remote systems it knows how to send to. Such a database would be very difficult to keep up to date ๐Ÿ“š.
  2. The mail transport service negotiates with the receiving system about its capabilities. If the receiving system can't support the specified content type, the mail is transformed into conventional ASCII before transmission. This would require changes to all existing SMTP implementations, and it couldn't be implemented when RFC-822 type messages are forwarded via Bitnet or other networks that don't implement SMTP ๐Ÿค”.
  3. An expanded directory service maintains information on the mail processing capabilities of receiving hosts. This removes the need for real-time negotiation with the final destination, but it still requires direct interaction with the directory service. Since directory querying is part of mail sending (as opposed to mail composing/reading systems), this requires changes to existing mailers as well as a major change to the domain name directory service ๐Ÿ—‚๏ธ.

We note in passing that the X.400 protocol implements approach number 2, and that the Draft Recommendations for X.DS, the Directory Service, would support option 3 ๐Ÿ“.

In the interest of getting structured messages going early, we choose not to recommend any of the three approaches above at the present time ๐Ÿš€. In a forthcoming RFC we'll propose a solution based on option 2, which requires modifying mailers to support negotiation over capabilities ๐Ÿ”ฎ. For now, users would be obliged to keep their own private list of recipient capabilities and take care not to send Postscript, TROFF, or other structured messages to recipients who can't process them ๐Ÿ“’. The penalty for slipping up is the recipient getting frustrated trying to read a raw Postscript or TROFF file painted on their screen ๐Ÿ˜ค. Some System Administrators may try to implement option 1 for their users, but that doesn't impose any requirement for changes on any other mail system ๐Ÿง‘โ€๐Ÿ’ป.

We recognize that the long-term solution must involve changes to mailers. However, to start standardizing the header fields now and to make experimenting possible, we're issuing the present RFC ๐Ÿงช๐Ÿ’œ.

3. The Content-type Header Field ๐Ÿฆ‹

Whatever structuring technique the Content-type field specifies, it must be known precisely to both the sender and the recipient of the message, or the message can't be properly interpreted ๐Ÿ”‘. Generally, that means the allowed parameter values for the Content-type: field must identify a well-defined, standardized, document structuring technique ๐Ÿ“. We don't rule out, though, using a Content-type: parameter value to specify a private structuring technique known only to the sender and the recipient ๐Ÿคซ.

More precisely, we propose that the Content-type: header field consists of up to four parameter values ๐ŸŽ€. The first, the type parameter, names the structuring technique. The second, optional, parameter is a version number, ver-num, which indicates a particular version or revision of the standardized structuring technique ๐Ÿ”ข. The third parameter is a resource reference, resource-ref, which may indicate a standard database of information to be used in interpreting the structured document ๐Ÿ—ƒ๏ธ. The last parameter is a comment ๐Ÿ’ฌ.

In the Extended Backus Naur Form of RFC-822, we have:

Content-Type:= type [";" ver-num [";" 1#resource-ref]] [comment]

3.1. Type Values ๐ŸŽ€

okay so the type parameter starts out with a tiny guest list of values, and it's giving very specific vibes ๐Ÿ’…

type:=           "POSTSCRIPT"/"SCRIBE"/"SGML"/"TEX"/"TROFF"/
                 "DVI"/"X-"atom

these values are not case sensitive, so POSTSCRIPT, Postscript, and POStscriPT are all the same bestie ๐Ÿซถ

POSTSCRIPT means the enclosed document is information encoded in the Postscript Page Definition Language, which was developed by Adobe Systems, Inc. [1] ๐Ÿ–จ๏ธ

SCRIBE means the document has embedded formatting info using the syntax of the Scribe document formatting language, distributed by the Unilogic Corporation. [6] โœ๏ธ

SGML means the document has structuring info that follows the rules of the Standard Generalized Markup Language, IS 8879, as published by the International Organization for Standardization. [3] ngl this one is a whole vibe ๐ŸŒธ Documents structured according to the ISO DIS 8613 (Office Document Architecture and Interchange Format) may also be encoded using SGML syntax ๐Ÿ“„

TEX means the document has embedded formatting info using the syntax of the TEX document production language. [4] ๐Ÿงฎ

TROFF means the document has embedded formatting info using the syntax specified for the TROFF formatting package, which was developed by AT&T Bell Laboratories. [5] ๐Ÿฆ‹

DVI means the document is information in the device independent file format produced by TROFF or TEX. No embedded syntax call-out here, just the file format ๐ŸŒˆ

"X-"atom is the main character move for private stuff: any type value that starts with the characters "X-" is a private value, so you do you ๐Ÿ‘‘

3.2. Version Number ๐Ÿงš

standard structuring techniques literally evolve over time, so we left room for a version number for the content type. Which values are valid depends on the type parameter ๐Ÿ“

ver-num:=      local-part

in particular, here are the valid values:

For type=POSTSCRIPT

ver-num:= "1.0"/"2.0"/"null"

For type=SCRIBE

ver-num:= "3"/"4"/"5"/"null"

For type=SGML

ver-num:="IS.8879.1986"/"null"

3.3. Resource Reference ๐Ÿ“š

resource-ref:=  local-part

okay this one is so clever โœจ Apple proved with their Laserwriter that a super general document structuring technique can get way more efficient if you define a set of macros or other similar resources that get used to interpret any transmitted stream. The Macintosh sends a LaserPrep file to the Laserwriter with font and macro definitions that later documents can call on. The result is that documents sent to the Laserwriter are way more compact than if they had to include the LaserPrep file every single time ๐Ÿคฏ The Resource Reference parameter lets you specify a well known resource, like a LaserPrep file, that the receiving system should use when it processes the message ๐Ÿ’œ

Resource references could also cover macro packages for use with TEX, or references to preprocessors like eqn and tbl for use with troff. Allowed values will vary depending on the type parameter ๐Ÿซง

in particular, we propose these values:

For type = POSTSCRIPT

resource-ref:=  "laserprep2.9"/"laserprep3.0"/"laserprep3.1"/
                "laserprep4.0"/local-part

For type = TROFF

resource-ref:=  "eqn"/"tbl"/"me"/local-part

3.4. Comment ๐Ÿ’ฌ

the comment field can be any extra comment text the user wants. Comments get wrapped in parentheses, as specified in RFC-822 โœ๏ธ

4. Conclusion โœจ

okay the big payoff: a standardized Content-type field lets mail reading systems automatically figure out what type a structured message body is, and then process it for display accordingly ๐ŸŽ€ The structured message body still has to conform to the RFC-822 requirements about allowable characters. A mail reading system doesn't need to take any specific action when it gets a message with a valid Content-Type header field. Still, being able to recognize this field and open the right display process will seriously improve readability, and it lets people exchange messages with mathematical symbols or foreign language characters ๐ŸŒ๐Ÿ”ฅ

in the near term, the major use of a Content-Type header field is probably going to be designating the message body as a Page Definition Language representation, like Postscript ๐Ÿ–จ๏ธ

Additional type values shall be registered with the Internet Assigned Numbers Coordinator at USC-ISI. Here's who to contact:

                Joyce K. Reynolds
                USC Information Sciences Institute
                4676 Admiralty Way
                Marina del Rey, CA  90292-6695

                213-822-1511    JKReynolds@ISI.EDU

REFERENCES ๐Ÿ“–

  • [1] Adobe Systems, Inc. Postscript Language Reference Manual. Addison-Wesley, Reading, Mass., 1985.
  • [2] Crocker, David H. RFC-822: Standard for the Format of ARPA Internet Text Messages. Network Information Center, August 13, 1982.
  • [3] ISO TC97/SC18. Standard Generalized Markup Language. Tech. Rept. DIS 8879, ISO, 1986.
  • [4] Knuth, Donald E. The TEXbook. Addison-Wesley, Reading, Mass., 1984.
  • [5] Ossanna, Joseph F. NROFF/TROFF User's Manual. Bell Laboratories, Murray Hill, New Jersey, 1976. Computing Science Technical Report No.54.
  • [6] Unilogic. SCRIBE Document Production Software. Unilogic, 1985. Fourth Edition.
๐Ÿ“ฆ where this page comes from