Excerpt: Section 3 of RFC 2184, "Parameter Value Continuations".

 The obvious solution, then, is to use multiple parameters to contain
 a single parameter value and to use some kind of distinguished name
 to indicate when this is being done.  And this obvious solution is
 exactly what is specified here: The asterisk character ("*") followed
 by a decimal count is employed to indicate that multiple parameters
 are being used to encapsulate a single parameter value.  The count
 starts at 0 and increments by 1 for each subsequent section of the
 parameter value.  Decimal values are used and neither leading zeroes
 nor gaps in the sequence are allowed.
 The original parameter value is recovered by concatenating the
 various sections of the parameter, in order.  For example, the
 content-type field
   Content-Type: message/external-body; access-type=URL;
    URL*0="ftp://";
    URL*1="cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar"
 is semantically identical to
   Content-Type: message/external-body; access-type=URL;
    URL="ftp://cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar"
 Note that quotes around parameter values are part of the value
 syntax; they are NOT part of the value itself.  Furthermore, it is
 explicitly permitted to have a mixture of quoted and unquoted
 continuation fields.

Example from Thunderbird 2.0:

Content-Type: application/msword;
 name="NEUE lettera d'ass. 
=?ISO-8859-1?Q?f=FCr_alle=2C_ausser_Privatperso?==?ISO-8859-1?Q?n=2Edoc?="
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename*0*=ISO-8859-1''%4E%45%55%45%20%6C%65%74%74%65%72%61%20%64%27%61;
 filename*1*=%73%73%2E%20%66%FC%72%20%61%6C%6C%65%2C%20%61%75%73%73%65%72;
 filename*2*=%20%50%72%69%76%61%74%70%65%72%73%6F%6E%2E%64%6F%63

Example from Outlook 11 (no continuation):

Content-Type: application/msword;
 name="whatever.doc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="whatever.doc"

Proposed code for the simple part of filename detection:

  if (!getDispositionParameter( "filename", buf))
  {
      if (!getMediaParameter( "name", buf))
      {
          buf = "save0000";
          bGenerated = true;
      }
  }
 
devinfo/rfc2231_notes.txt · Last modified: 28.09.2007 23:02 by kai
 
Recent changes RSS feed Driven by DokuWiki