RFC 2017

Definition of the URL MIME External-Body Access-Type

πŸ“… published October 1996, from ietf

Definition of the URL MIME External-Body Access-Type πŸŽ€

Network Working Group 🌸 Request for Comments: 2017 πŸ“„ Category: Standards Track πŸ’– Date: October 1996

Authors: N. Freed (Innosoft International) 🫢, K. Moore (University of Tennessee) πŸ’œ, and A. Cargille (WG Chair) ✨

Okay, so the title block is giving us the basics: this is a Standards Track RFC from the IETF's Network Working Group, dated October 1996. It doesn't list anything it obsoletes or updates, so it's totally a fresh addition. πŸ¦‹


Status of This Memo πŸ“

Okay, bestie, this bit explains what kind of document this is. It's an Internet standards track protocol for the Internet community 🌈, and it's basically inviting everyone to discuss it and suggest improvements. For the current standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1). πŸ’… Distribution of this memo is unlimited, so share it with everyone ✨.

1. Abstract ✨

Okay, so this memo defines a new access-type for message/external-body MIME parts that uses Uniform Resource Locators (URLs) πŸ”₯. URLs give you schemes to reach external objects through a growing bunch of protocols, like HTTP, Gopher, and TELNET 🌐. The first set of URL schemes is defined in RFC 1738. πŸ“

2. Introduction 🧚

Okay, so MIME has this super handy feature where an object can hold a reference or pointer to some data instead of the actual data itself πŸ’œ. It's built into the message/external-body media type from RFC 1521 πŸŽ€. People are using it more and more to save bandwidth when big objects go out to big mailing lists πŸ™ˆ.

Every message/external-body reference has to say how the actual data can be retrieved. Those mechanisms are called access types πŸ¦‹. RFC 1521 gives us an initial set of them: "FTP", "ANON-FTP", "TFTP", "LOCAL-FILE", and "MAIL-SERVER" πŸ’–.

URLs also let you grab remote data automatically 🌸. Every URL string starts with a scheme, and the scheme tells you how to use the rest of the string with some protocol to get the data ✨. Here's the catch: some URL schemes cover protocol operations that don't have a matching MIME access type 😭. So registering an access type for URLs gives message/external-body access to URL retrieval mechanisms that aren't available as access types yet 🫢. It also covers any future mechanisms that get URL schemes πŸ”₯.

This access type is only meant for URLs that actually retrieve something πŸ’…. Other URL mechanisms, like mailto, may not be used in this context πŸ™ˆ.

3. Definition of the URL Access-Type πŸ’–

Here's how the URL access-type is defined:

  1. The name of the access-type is URL. πŸŽ€
  2. A new message/external-body content-type parameter stores the URL string πŸ’œ. It's also named "URL", and this parameter is mandatory for this access-type 🫢. The next section covers its syntax and use πŸ¦‹.
  3. The phantom body area of the message/external-body is not used and should be left blank 🌸.

Here's a quick example of the URL access-type in action 🧚:

Content-type: message/external-body; access-type=URL;
              URL="http://www.foo.com/file"

Content-type: text/html
Content-Transfer-Encoding: binary

THIS IS NOT REALLY THE BODY!

3.1. Syntax and Use of the URL parameter 🌈

Okay, so this part uses the ABNF notation and definitions from RFC 822 and RFC 1521 ✨. The syntax of the URL parameter goes like this πŸ’…:

URL-parameter := <"> URL-word *(*LWSP-char URL-word) <">

URL-word := token
            ; Must not exceed 40 characters in length

The syntax of an actual URL string is in RFC 1738 πŸ“. URL strings can be any length and can hold pretty much any character content πŸ™ˆ. That's a problem when URLs get stuffed into MIME body part headers that are wrapped under RFC 822 rules 😭. So the URL gets transformed into a URL-parameter before it goes into a message/external-body content-type spec πŸ”₯:

  1. First, check that every SPACE, CTL, double quote, backslash, and 8-bit character in the URL string is already encoded with the URL encoding scheme from RFC 1738 πŸ’–. Any unencoded ones must be encoded 🫢. This doesn't change the URL. It's just a different way of writing the same URL πŸ’œ.
  2. Next, break the resulting URL string into substrings of 40 characters or less πŸŽ€.
  3. Then put each substring into the URL-parameter string as a URL-word, with one or more spaces between them πŸ¦‹. The enclosing quotes are always required, because every URL has one or more colons, and colons are tspecial characters [RFC 1521] 🌸.

Pulling the URL string back out is even easier 🧚. You just remove the enclosing quotes and any linear whitespace, and whatever's left is the URL string ✨.

Here's how a long URL gets handled πŸ’…:

Content-type: message/external-body; access-type=URL;
              URL="ftp://ftp.deepdirs.org/1/2/3/4/5/6/7/
                   8/9/10/11/12/13/14/15/16/17/18/20/21/
                   file.html"

Content-type: text/html
Content-Transfer-Encoding: binary

THIS IS NOT REALLY THE BODY!

Some URLs can reach multiple versions of the same object in different formats 🌈. HTTP is a good example πŸ“. But applications might not expect something whose type doesn't match what the message/external-body says 😭, and they might have already made irrevocable choices based on that info πŸ™ˆ.

Because of all that, there's one restriction πŸ‘‘: when URLs are used with an access-type, only versions of the object whose content-type matches what the inner message/external-body header specifies can be retrieved and used πŸ’–.

4. Security Considerations πŸ”₯

Okay, bestie, this part is serious 😭. Using URLs with a MIME access-type has no different security concerns than using them anywhere else πŸ’œ. The specific security considerations for each URL type are covered in the document that defines that URL 🫢.

Also, the Content-MD5 field can be used with any message/external-body access-type to provide an integrity check πŸ¦‹. This makes sure the referenced object really is what the message originator meant it to be πŸ’…. It is NOT a signature service, and you should not confuse it with one, but it's still super useful in lots of situations πŸ‘‘.

5. Acknowledgements 🌸

The authors are grateful for the feedback and review from John Beck and John Klensin 🫢.

6. References πŸ“š

[RFC-822] : Crocker, D., "Standard for the Format of ARPA Internet Text Messages", STD 11, RFC 822, UDEL, August 1982. 🧚

[RFC-1521] : Borenstein, N. and N. Freed, "MIME (Multipurpose Internet Mail Extensions): Mechanisms for Specifying and Describing the Format of Internet Message Bodies", RFC 1521, Bellcore, Innosoft, September, 1993. πŸ’œ

[RFC-1590] : Postel, J., "Media Type Registration Procedure", RFC 1590, USC/Information Sciences Institute, March 1994. πŸŽ€

[RFC-1738] : Berners-Lee, T., Masinter, L., and M. McCahill, "Uniform Resource Locators (URL)", December 1994. 🌈

7. Authors' Addresses πŸ’Œ

Ned Freed Innosoft International, Inc. 1050 East Garvey Avenue South West Covina, CA 91790 USA

Phone: +1 818 919 3600 Fax: +1 818 919 3614 EMail: ned@innosoft.com

Keith Moore Computer Science Dept. University of Tennessee 107 Ayres Hall Knoxville, TN 37996-1301 USA

EMail: moore@cs.utk.edu


That's the whole spec, bestie! πŸŒˆπŸ‘‘πŸ’… Iconic work from everyone involved 🫢✨

πŸ“¦ where this page comes from