<?xml version='1.0' encoding="US-ASCII" ?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd' [
  <!ENTITY rfc.2119 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml'>
  <!ENTITY rfc.2629 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2629.xml'>
  <!ENTITY rfc.2046 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2046.xml'>
  <!ENTITY rfc.2047 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2047.xml'>
  <!ENTITY rfc.2231 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2231.xml'>
  <!ENTITY rfc.1867 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.1867.xml'>
  <!ENTITY rfc.2183 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2183.xml'>
  <!ENTITY rfc.2388 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2388.xml'>
  <!ENTITY rfc.2854 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2854.xml'> 
  <!ENTITY rfc.3986 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml'>
  <!ENTITY rfc.5987 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5987.xml'>
  <!ENTITY rfc.6838 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6838.xml'>
]>
  
<?rfc-ext html-pretty-print="prettyprint https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"?>

<rfc number="7578"
     ipr='trust200902' 
     submissionType="IETF"
     obsoletes='2388'
     consensus="yes"
     category='std'
     xmlns:x='http://purl.org/net/xml2rfc/ext'>

  <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
  <?rfc toc='yes' ?>
  <?rfc symrefs='yes' ?>
  <?rfc sortrefs='yes'?>
  <?rfc compact="yes" ?>
  <?rfc subcompact="no" ?>

  <front>

    <title abbrev='multipart/form-data'>Returning Values from Forms: multipart/form-data</title>

    <author initials='L.'
	    surname='Masinter'
	    fullname='Larry Masinter'>
      <organization>Adobe</organization>
      <address>
	<email>masinter@adobe.com</email>
	<uri>http://larry.masinter.net</uri>
      </address>
    </author>
    <date month="July" year="2015"/>
    
    <area>Applications</area>
    <workgroup>APPSAWG</workgroup>

<!-- [rfced] Please insert any keywords (beyond those that appear in the
title) for use on http://www.rfc-editor.org/search/rfc_search.php. -->
<keyword>example</keyword>
    
    <abstract>
      <t>
	This specification defines the multipart/form-data
	media type, which can be used by a wide variety of
	applications and transported by a wide variety of protocols as
	a way of returning a set of values as the result of a user
	filling out a form.  This document obsoletes RFC 2388.
      </t>
    </abstract>
  </front>
  <middle>
    <section title='Introduction'>
      <t>
	In many applications, it is possible for a user to be
	presented with a form. The user will fill out the form,
	including information that is typed, generated by user input,
	or included from files that the user has selected. When the
	form is filled out, the data from the form is sent from the
	user to the receiving application.
      </t>


      <t>
	The definition of multipart/form-data is derived from one
	of those applications, originally set out in <xref
	target='RFC1867'/> and subsequently incorporated into <xref
	target='W3C.REC-html32-19970114'>HTML 3.2</xref>, where forms
	are expressed in HTML, and the form data is sent
	via HTTP or electronic mail. This representation is widely
	implemented in numerous web browsers and web servers.
      </t>
      <t>
	However, multipart/form-data is
	also used for forms that are presented using representations
	other than HTML (spreadsheets, PDF, etc.) and for transport
	using means other than electronic mail or HTTP; it is used in
	distributed applications that do not involve forms at all or
	do not have users filling out the form. For this reason, this
	document defines a general syntax and semantics independent of
	the application for which it is used, with specific rules for
	web applications noted in context.
      </t>

      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in BCP 14, RFC 2119 <xref
      target="RFC2119"></xref>.</t>
      
    </section>
    <section title="Percent-Encoding Option" anchor="percenthex">
      <t>Within this specification, "percent-encoding" (as defined
      in <xref target="RFC3986"/>) 
      is offered as a possible way of encoding 
      characters in file names that are otherwise
      disallowed, including non-ASCII characters, spaces,
      control characters, and so forth.
      The encoding is
      created replacing each non-ASCII or disallowed character
      with a sequence, where each byte of the UTF-8 encoding
      of the character is represented by a percent-sign (%)
      followed by the (case-insensitive) hexadecimal of that byte.
      
      </t>
    </section>


    <section title="Advice for Forms and Form Processing">
      <t>
	The representation and interpretation of forms and the nature
	of form processing is not specified by this document.
	However, for forms and form processing that result in the 
	generation of multipart/form-data, some suggestions are
	included.
      </t>
      <t>
	In a form, there is generally a sequence of fields, where each
	field is expected to be supplied with a value, e.g., by a user
	who fills out the form.  Each field has a name.  After a form
	has been filled out and the form's data is "submitted", the
	form processing results in a set of values for each field --
	the "form data".
      </t>
      <t>
	In forms that work with multipart/form-data, field names could
	be arbitrary Unicode strings; however, restricting field names
	to ASCII will help avoid some interoperability issues
	(see <xref target='non-ascii-fields'/>). 
      </t>
      <t>
	Within a given form, ensuring field names are unique is also
	helpful.  Some fields may have default values or presupplied
	values in the form itself. Fields with presupplied values
	might be hidden or invisible; this allows using generic
	processing for form data from a variety of actual forms.
      </t>
    </section>
    <section title="Definition of multipart/form-data">
      <t>
	The media type multipart/form-data
	follows the model of multipart MIME data streams as
	specified in <xref x:fmt="of" x:sec="5.1" target='RFC2046'/>; changes are
	noted in this document.
      </t>
      <t>
	A multipart/form-data body
	contains a series of parts separated by a boundary.
      </t>

      <section title="&quot;Boundary&quot; Parameter of multipart/form-data">
	<t>

	  As with other multipart types, the parts are delimited with
	  a boundary delimiter, constructed using CRLF, "--", and the value of the
	  "boundary" parameter.  The boundary is supplied as a "boundary"
	  parameter to the multipart/form-data
	  type. As noted in <xref x:sec="5.1" x:fmt="of" target='RFC2046'/>, 
	  the boundary delimiter MUST NOT appear inside any
	  of the encapsulated parts, and it is often necessary to
	  enclose the "boundary"
	  parameter values in quotes in the Content-Type header field.
	</t>
      </section>
      <section title='Content-Disposition Header Field for Each Part'>
	<t>
	  Each part MUST contain a Content-Disposition header field
	  <xref target='RFC2183'/> where the
	  disposition type is <spanx style='verb'>form-data</spanx>.
	  The Content-Disposition header field
	  MUST also contain an additional parameter of <spanx
	  style='verb'>name</spanx>; the value of the <spanx
	  style='verb'>name</spanx> parameter is the original field
	  name from the form (possibly encoded; see <xref
	  target='non-ascii-fields'/>).

  For example, a part might
  contain a header field such as the following, with the body of
  the part containing the form data of the "user" field:

      <figure><artwork type="example">
        Content-Disposition: form-data; name="user"
      </artwork></figure>
	</t>

	<t>
	  For form data that represents the content of a file, a
	  name for the file SHOULD be supplied as well, by using a
	  <spanx style='verb'>filename</spanx> parameter of the Content-Disposition header field.  


   The file name isn't mandatory for
   cases where the file name isn't available or is meaningless or
   private; this might result, for example, when selection or drag-and-
   drop is used or when the form data content is streamed directly from a
   device.

	</t>
	<t>If a "filename" parameter is supplied, the requirements
	of <xref x:sec="2.3" x:fmt="of" target="RFC2183"/> for the "receiving
	MUA" (i.e., the receiving Mail User Agent)
	apply to receivers of multipart/form-data
	as well: do not use the file name blindly, check and
	possibly change to match local file system conventions if
	applicable, and do not use directory path information that
	may be present. </t>
	<t>
	  In most multipart types, the MIME header fields in each part are
	  restricted to US-ASCII; for compatibility with those
	  systems, file names normally visible to users MAY be encoded
	  using the percent-encoding method in <xref
	  target="percenthex"/>, following how a "file:" URI <xref
	  target="URI-SCHEME"/> might be encoded.
	  
	</t>
	<t>NOTE: The encoding method described in <xref target="RFC5987"/>,
	which would add a "filename*" parameter to the Content-Disposition header field, MUST NOT be used. 
	</t>

	<t>
	  Some commonly deployed systems use multipart/form-data with
	  file names directly encoded including octets outside the
	  US-ASCII range. The encoding used for the file names is
	  typically UTF-8, although HTML forms will use the charset
	  associated with the form.
	</t>
      </section>
	  
      <section title="Multiple Files for One Form Field">
	<t>The form data for a form field might include
	multiple files.</t>
	<t><xref target='RFC2388'/> suggested that multiple files
	for a single form field be transmitted using
	a nested "multipart/mixed" part. This usage is
	deprecated.
	</t>
	<t>
	  To match widely deployed implementations, multiple files
	  MUST be sent by supplying each file in a separate part
	  but all with the same <spanx style='verb'>name</spanx>
	  parameter.
	</t>
	<t>
	  Receiving applications intended for wide applicability (e.g.,
	  multipart/form-data parsing libraries) SHOULD also support
	  the older method of supplying multiple files.
	</t>
      </section>
	
      <section title='Content-Type Header Field for Each Part'>
	<t>
	  Each part MAY have an (optional) <spanx
	  style='verb'>Content-Type</spanx> header field, which defaults to "text/plain".  If the contents of a file
	  are to be sent, the file data SHOULD be labeled with an
	  appropriate media type, if known, or "application/octet-stream".
	</t>

      </section>
      <section title='The Charset Parameter for "text/plain" Form Data'>
	<t>
	  In the case where the form data is text, the charset parameter
	  for the "text/plain" Content-Type
	  MAY be used to indicate the character encoding used in that
	  part.  For example, a form with a text field in which a user
	  typed "Joe owes &lt;eu&gt;100", where &lt;eu&gt; is the Euro
	  symbol, might have form data returned as:
	</t>
	<figure><artwork type="example">
    --AaB03x
    content-disposition: form-data; name="field1"
    content-type: text/plain;charset=UTF-8
    content-transfer-encoding: quoted-printable
      
    Joe owes =E2=82=AC100.
    --AaB03x
</artwork></figure>


	<t>In practice, many widely deployed implementations do not
	supply a charset parameter in each part, but rather, they rely
	on the notion of a "default charset" for a multipart/form-data
	instance. Subsequent sections will explain how the default
	charset is established. </t>
      </section>
	
      <section title="The _charset_ Field for Default Charset">

        <t>Some form-processing applications (including HTML) have the
        convention that the value of a form entry with entry name
        <spanx style='verb'>_charset_</spanx> and type <spanx
        style='verb'>hidden</spanx> is automatically set when the form
        is opened; the value is used as the default charset of text
        field values (see form-charset in <xref target="form-charset"
        />).  In such cases, the value of the default charset for each
        "text/plain" part without a charset parameter is the supplied
        value. For example:</t>
  
  <figure><artwork type="example">
    --AaB03x
    content-disposition: form-data; name="_charset_"
      
    iso-8859-1
    --AaB03x--
    content-disposition: form-data; name="field1"
    
    ...text encoded in iso-8859-1 ...
    AaB03x--
  </artwork></figure>

      </section>

      <section title="Content-Transfer-Encoding Deprecated"
	       anchor='cte'>

	<t>Previously, it was recommended that senders use a Content-Transfer-Encoding encoding (such
	as <spanx style='verb'>quoted-printable</spanx>) for each
	non-ASCII part of a multipart/form-data body because that
	would allow use in transports that only support a <spanx
	style='verb'>7bit</spanx> encoding. This use is deprecated for
	use in contexts that support binary data such as HTTP. Senders
	SHOULD NOT generate any parts with a Content-Transfer-Encoding header field.</t>

	<t>Currently, no deployed implementations that send such
	bodies have been discovered.</t>

      </section>
	  
      <section title='Other "Content-" Header Fields'>
	<t>The multipart/form-data media
	type does not support any MIME header fields in parts other than
	Content-Type, Content-Disposition, and (in limited
	circumstances) Content-Transfer-Encoding. Other header fields
	MUST NOT be included and MUST be ignored.
	</t>
      </section>
    </section>
	    
    <section title="Operability Considerations">

      <section title="Non-ASCII Field Names and Values"
	       anchor="non-ascii-fields">
	<t>
	  
	  Normally, MIME header fields in multipart bodies are required to
	  consist only of 7-bit data in the US-ASCII character set.
	  While <xref target="RFC2388"/> suggested that non-ASCII
	  field names be encoded according to the method in
	  <xref target="RFC2047"/>, this practice doesn't seem to have been
	  followed widely.
	</t>

	<t>This specification makes three sets of recommendations 
	for three different states of workflow.</t>

	<section title="Avoid Non-ASCII Field Names">
          <t>For broadest interoperability with existing deployed
          software, those creating forms SHOULD avoid non-ASCII field
          names. This should not be a burden because, in general, the
          field names are not visible to users. The field names
	  in the underlying need not match what the user
	  sees on the screen.</t>
	  <t>If non-ASCII field names are unavoidable, form
	  or application creators SHOULD use UTF-8 uniformly.
	  This will minimize interoperability problems.
	  </t>
        </section>
	
	<section title="Interpreting Forms and Creating multipart/form-data Data"
		 anchor="form-charset">
	  <t>Some applications of this specification will supply a
	  character encoding to be used for interpretation of the
	  multipart/form-data body. In particular, <xref
	  target="W3C.REC-html5-20141028">HTML 5</xref> uses
	  <list style='symbols'>
	    <t>the content of a "_charset_" field, if
	    there is one;</t>
	    <t>the value of an accept-charset attribute of
	    the &lt;form&gt; element, if there is one;</t>
	    <t>the character encoding of the document containing
	    the form, if it is US-ASCII compatible; </t>
	    <t>otherwise, UTF-8.</t>
	  </list>
	  
	  Call this value the form-charset. Any text,
	  whether field name, field value, or ("text/plain")
	  form data that uses characters outside
	  the ASCII range MAY be represented directly
	  encoded in the form-charset.
	  </t>
	</section>
	    
	<section title="Parsing and Interpreting Form Data">
	  <t> 
            While this specification provides guidance for the creation of
            multipart/form-data, parsers and interpreters 
            should be aware of the variety of implementations. File
            systems differ as to whether and how they normalize
            Unicode names, for example.  The matching of form elements
            to form-data parts may rely on a fuzzier match.  In
            particular, some multipart/form-data generators might have
            followed the previous advice of <xref target="RFC2388"/>
            and used the "encoded-word"
            method of encoding non-ASCII values, as described in <xref
	    target="RFC2047"/>:

	    <figure><artwork type="abnf">
   encoded-word = "=?" charset "?" encoding "?" encoded-text "?="
</artwork></figure>
          </t>
	  <t>
            Others have been known to follow
            <xref target="RFC2231"/>, to send unencoded UTF-8, or even
            to send strings encoded in the form-charset.
	  </t>
          <t>
	    For this reason, interpreting multipart/form-data (even from
	    conforming generators) may require knowing the charset
	    used in form encoding in cases where the _charset_ field
	    value or a charset parameter of a "text/plain" Content-Type
	    header field is not supplied.

          </t>
	</section>
      </section>
      <section title="Ordered Fields and Duplicated Field Names">
	<t>
	  Form processors given forms with a well-defined ordering
	  SHOULD send back results in order. (Note that there are some forms that do not define a natural order.)
	  Intermediaries MUST NOT reorder the results.
	  Form parts with identical field names MUST NOT be coalesced. 
	</t>
      </section>	
      <section title="Interoperability with Web Applications">

	<t>
	  Many web applications use the "application/x-www-form-urlencoded"
	  method for returning data from forms. This format is quite
	  compact, for example:
	</t>
	<figure><artwork type="example">
   name=Xavier+Xantico&amp;verdict=Yes&amp;colour=Blue&amp;happy=sad&amp;Utf%F6r=Send
</artwork></figure>
	<t>
	  However, there is no opportunity to label the enclosed
	  data with a content type, apply a charset, or use other
	  encoding mechanisms.
	</t>
	<t>
	  Many form-interpreting programs (primarily web browsers)
	  now implement and generate multipart/form-data, but a receiving
 application might also need to support 
	  the
<vspace/>
"application/x-www-form-urlencoded" format.
	</t>
      </section>

      <section title="Correlating Form Data with the Original Form">
      <t>
	This specification provides no specific mechanism by which
	multipart/form-data can be associated with the form that
	caused it to be transmitted. This separation is intentional;
	many different forms might be used for transmitting the same
	data. In practice, applications may supply a specific form
	processing resource (in HTML, the ACTION attribute in a FORM
	tag) for each different form.  Alternatively, data about the
	form might be encoded in a "hidden field" (a field that is
	part of the form but that has a fixed value to be transmitted
	back to the form-data processor).
      </t>
      </section>
    </section>

    <section title="IANA Considerations">
      <t>
	The media type registration of
	multipart/form-data has been updated to point to this document, using the
	template in <xref target='template'/>.  In addition, 
	 the registrations of the "name" parameter and the
	"form-data" value in the "Content Disposition Values and
	Parameters" registry have been updated to both point to this document.
      </t>
    </section>

    <section title="Security Considerations" anchor="security">
      <t>
      	All form-processing software should treat user supplied
      	form-data with sensitivity, as it often contains confidential
      	or personally identifying information. There is widespread use
      	of form "auto-fill" features in web browsers; these might be
      	used to trick users to unknowingly send confidential
      	information when completing otherwise innocuous tasks.
      	multipart/form-data does not supply any features for checking
      	integrity, ensuring confidentiality, avoiding user confusion,
      	or other security features; those concerns must be addressed
      	by the form-filling and form-data-interpreting applications.
      </t>
      <t>
	Applications that receive forms and process them must be
        careful not to supply data back to the requesting form-processing site that was not intended to be sent.
      </t>
      <t>
	It is important when interpreting the filename of the
	Content-Disposition header field to not inadvertently overwrite files in the
	recipient's file space.
      </t>
      <t>
	User applications that request form information from users
	must be careful not to cause a user to send information to the
	requestor or a third party unwillingly or unwittingly. For
	example, a form might request that spam information be sent to
	an unintended third party or private information be sent
	to someone that the user might not actually intend. While this
	is primarily an issue for the representation and
	interpretation of forms themselves (rather than the data
	representation of the form data),  the
	transportation of private information must be done in a way
	that does not expose it to unwanted prying.
      </t>
      <t>
	With the introduction of form-data that can reasonably send
	back the content of files from a user's file space, the
	possibility arises that a user might be sent an automated script that
	fills out a form and then sends one of the user's local files to
	another address. Thus, additional caution is required
	when executing automated scripting where form-data might
	include a user's files.
      </t>
      <t>
	Files sent via multipart/form-data may contain arbitrary
	executable content, and precautions against malicious
	content are necessary.
      </t>
      <t>
	The considerations of Sections <xref x:sec="2.3" x:fmt="number" target="RFC2183"/> and <xref x:sec="5" x:fmt="number" target="RFC2183"/> of <xref target="RFC2183"/>,
	with respect to the "filename" parameter of the Content-Disposition
	header field, also apply to its usage here. 
      </t>
    </section>

    <section title="Media Type Registration for multipart/form-data" anchor="template">
      <t>
      This section is the media type registration using the template from <xref target="RFC6838"/>.
	<list style='hanging'>
	<t hangText='Type name:'>
	  multipart
	</t>
	<t hangText='Subtype name:'>
	  form-data
	</t>
	<t hangText='Required parameters:'>
	  boundary
	</t>
	<t hangText='Optional parameters:'>
	  none
	</t>
	<t hangText='Encoding considerations:'>
	  Common use is BINARY. 
	  <vspace />

	  In limited use (or transports that restrict the encoding to
	  7bit or 8bit), each part is encoded separately using
	  Content-Transfer-Encoding; see <xref target='cte'/>.
	</t>
	<t hangText='Security considerations:'>
	  See <xref target="security"/> of this document.
	</t>

	<t hangText='Interoperability considerations:'>
	  This document makes several recommendations for
	  interoperability with deployed implementations, including
	  <xref target='cte'/>.
	</t>
	<t hangText='Published specification:'>
	  This document.
	</t>
	<t hangText='Applications that use this media type:'>
	  Numerous web browsers, servers, and web applications.
	</t>
	<t hangText='Fragment identifier considerations:'>
	  None; fragment identifiers are not defined for this type.
	</t>

	<t hangText='Additional information:'>
<?rfc subcompact="yes"?>
<list style="empty">
  <t>Deprecated alias names for this type: N/A</t>
  <t>Magic number(s): N/A</t>
  <t>File extension(s): N/A</t>
  <t>Macintosh file type code(s): N/A</t>
</list>
<?rfc subcompact="no"?>
	</t>
	<t hangText='Person &amp; email address to contact for further information:'>
	  Author of this document.
	</t>
	<t hangText='Intended usage:'>
	  COMMON
	</t>
	<t hangText='Restrictions on usage:'>
	  none
	</t>
	<t hangText='Author:'>
	  Author of this document.
	</t>
	<t hangText='Change controller:'>
	  IETF
	</t>
	<t hangText='Provisional registration:'>
	  N/A
	</t>
	</list>
      </t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      &rfc.2119;
      &rfc.2046;
      &rfc.2047;
      &rfc.2231;
      &rfc.2183;
      &rfc.3986;
      
    </references>
    <references title="Informative References">

      &rfc.1867;
      &rfc.2388;
      &rfc.5987;
      &rfc.6838;

<reference anchor="W3C.REC-html5-20141028"
	   target="http://www.w3.org/TR/2014/REC-html5-20141028">
<front>
<title>HTML5</title>
<author	initials="I." surname="Hickson" fullname="Ian Hickson"><organization/></author>
<author initials="R." surname="Berjon" fullname="Robin Berjon"><organization/></author>
<author initials="S." surname="Faulkner" fullname="Steve Faulkner"><organization/></author>
<author initials="T." surname="Leithead" fullname="Travis Leithead"><organization/></author>
<author initials="E." surname="Navara" fullname="Erika Doyle Navara"><organization/></author>
<author initials="E." surname="O'Connor" fullname="Edward O'Connor"><organization/></author>
<author initials="S." surname="Pfeiffer" fullname="Silvia Pfeiffer"><organization/></author>
<date month="October" year="2014"/>
</front>
<seriesInfo name="W3C Recommendation"
	    value="REC-html5-20141028"/>
<format type="HTML" target="http://www.w3.org/TR/2014/REC-html5-20141028"/></reference>

<reference anchor="W3C.REC-html32-19970114"
	   target="http://www.w3.org/TR/REC-html32-19970114">
<front>
<title>HTML 3.2 Reference Specification</title>
<author initials="D." surname="Raggett" fullname="Dave Raggett"><organization/></author>
<date month="January" day="14" year="1997"/>
</front>
<seriesInfo name="W3C Recommendation"
	    value="REC-html32-19970114"/>
<format type="HTML" target="http://www.w3.org/TR/REC-html32-19970114"/></reference>


<!--draft-ietf-appsawg-file-scheme-01: I-D Updates draft-ietf-appsawg-file-scheme-00-->

<reference anchor='URI-SCHEME'>
<front>
<title>The file URI Scheme</title>
<author initials='M' surname='Kerwin' fullname='Matthew Kerwin'>
    <organization />
</author>
<date month='January' year='2015' />
</front>
<seriesInfo name='Work in Progress,' value='draft-ietf-appsawg-file-scheme-00' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-appsawg-file-scheme-00.txt' />
</reference>


    </references>
    <section title="Changes from RFC 2388">
      <t>The handling of non-ASCII field names has changed -- 
      the method described in RFC 2047 is no longer recommended; instead, it is suggested that 
      senders send UTF-8 field names directly and that file names be sent
      directly in the form-charset.
      </t>
      <t>
	  The handling of multiple files submitted as the result of a
	  single form field (e.g., HTML's &lt;input type=file multiple&gt;
	  element) results in each file having its own top-level part with
	  the same name parameter; the method of using a nested
	  "multipart/mixed"
	  from <xref target="RFC2388"/> is no
	  longer recommended for creators and is not required
	  for receivers as there are
	  no known implementations of senders.
	</t>
	<t>
	  The _charset_ convention and use of an explicit "form-data"
	  charset is documented; also, "boundary" is now a required parameter in Content-Type.
	</t>
	<t>
	  The relationship of the ordering of fields within a form and
	  the ordering of returned values within multipart/form-data was
	  not defined before, nor was the handling of the case where a
	  form has multiple fields with the same name.
	</t>
	<t>
   Various editorial changes were made; they include removing the obsolete
   discussion of alternatives from the appendix, updating the references, 
and moving the outline of form processing into the introduction.

	</t>
    </section>

    <section title="Alternatives">
	
      <t>There are numerous alternative ways in which form data can be
      encoded; many are listed in <xref x:sec="5.2" x:fmt="of" target="RFC2388"/>.
      The multipart/form-data encoding is verbose, especially if
      there are many fields with short values. In most use cases, this
      overhead isn't significant. </t>

      <t>More problematic are the differences introduced when
      implementors opted to not follow <xref target="RFC2388"/> when
      encoding non-ASCII field names (perhaps because "may" should
      have been "MUST").  As a result, parsers need to be more complex
      for matching against the possible outputs of various encoding
      methods.
      </t>
    </section>
    <section title="Acknowledgements" numbered="no">
<t>
Many thanks to the those who reviewed this document -- Alexey Melnikov,
Salvatore Loreto, Chris Lonvick, Kathleen Moriarty, Barry Leiba, Julian
Reschke, Tom Petch, Ned Freed, Cedric Brancourt, as well as others, including
Ian Hickson, who requested it be produced in the first place.
</t>
    </section>
  </back>
</rfc>
