Changes between Version 5 and Version 6 of ContentDispositionErrorHandling


Ignore:
Timestamp:
Dec 2, 2010, 12:10:20 AM (9 years ago)
Author:
ietf@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ContentDispositionErrorHandling

    v5 v6  
    1919== Decoding the File Name ==
    2020
    21 To filename-decode an encoded-string, parse the encoded-string using the
    22 following grammar:
     21To filename-decode an encoded-string, use the following algorithm:
    2322
    24 {{{
    25 encoded-string = word *( 1*delimiter word )
    26 delimiter      = LWS
    27 word           = <OCTET, except delimiter>
    28 }}}
    29 
    30 Consider each gramatical element (either a delimiter or a word) in the order
    31 they appear in the encoded-string:
    32 
    33  1. If the gramatical element is a delimiter, emit a SP character.
    34  2. If the gramatical element is a word, process the element as follows:
    35   a. If the word contains non-ASCII characters, emit the word (decoded as ISO-8859-1) and proceed to the next gramatical element.
    36   b. Let the url-unescaped-word be the word %-unescaped.
    37   c. Emit the url-unescaped-word (decoded as UTF-8) and proceed to the next grammatical element.  (There's actually more sadness here if the url-unescaped-word isn't valid UTF-8.)
     23 1. If the encoded-string contains non-ASCII characters, emit the encoded-string (decoded as ISO-8859-1) and abort these steps.
     24 2. Let the url-unescaped-string be the encoded-string %-unescaped.
     25 3. Emit the url-unescaped-string (decoded as UTF-8).  (There's actually more sadness here if the url-unescaped-string isn't valid UTF-8.)
    3826
    3927The emitted characters are the decoded file name.