<?xml version="1.0" encoding="ISO-8859-1"?>
<tc:test-cases xmlns:tc="mailto:julian.reschke@greenbytes.de?subject=RFC2231">
  
  <tc:ua name="FF12" group="FF">Firefox 12</tc:ua>
  <tc:ua name="FF14" group="FF">Firefox 14 ("aurora" - 2012-04-29)</tc:ua>
  <tc:ua name="FF15" group="FF">Firefox 15 ("nightly" - 2012-04-30)</tc:ua>
  <tc:ua name="MSIE8" group="MSIE">Microsoft IE 8</tc:ua>
  <tc:ua name="MSIE9" group="MSIE">Microsoft IE 9</tc:ua>
  <tc:ua name="Opera">Opera 11.60</tc:ua>
  <tc:ua name="Safari">Safari 5.1</tc:ua>
  <tc:ua name="Konq">Konqueror 4.7.4</tc:ua>
  <tc:ua name="Chr18" group="C">Google Chrome 18</tc:ua>

  <tc:group name="Content-Disposition: Disposition-Type Inline" anchor="c-d-inline">

    <tc:prose>
      <p>
        Various tests relating to the "inline" disposition type, see 
        <a href="http://greenbytes.de/tech/webdav/rfc6266.html#rfc.section.4.2">Section 4.2 of RFC 6266</a>.
      </p>
    </tc:prose>
  
    <tc:test-case code="inlonly">
      <tc:content-disposition>inline</tc:content-disposition>
      <tc:description>'inline' only</tc:description>
      <tc:expectation>This should be equivalent to not including the header at all.</tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="inlonlyquoted" type="parseerror">
      <tc:content-disposition>"inline"</tc:content-disposition>
      <tc:description>'inline' only, using double quotes</tc:description>
      <tc:expectation>This is invalid syntax, thus the header should be ignored.</tc:expectation>
      <tc:result for="FF12" outcome="warn">apparently parsed as unknown disposition type, thus defaulting to "attachment"</tc:result>
      <tc:result for="FF14" outcome="warn">apparently parsed as unknown disposition type, thus defaulting to "attachment"</tc:result>
      <tc:result for="FF15" outcome="warn">apparently parsed as unknown disposition type, thus defaulting to "attachment"</tc:result>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="inlwithasciifilename">
      <tc:content-disposition>inline; filename="<b>foo.html</b>"</tc:content-disposition>
      <tc:description>
        'inline', specifying a filename of <code>foo.html</code>
      </tc:description>
      <tc:expectation>
        Some UAs use this filename in a subsequent "save" operation.
      </tc:expectation>
      <tc:result for="FF12" outcome="pass">uses the filename in subsequent 'save' operation</tc:result>
      <tc:result for="FF14" outcome="pass">uses the filename in subsequent 'save' operation</tc:result>
      <tc:result for="FF15" outcome="pass">uses the filename in subsequent 'save' operation</tc:result>
      <tc:result for="MSIE8" outcome="unsupported">filename information not used</tc:result>
      <tc:result for="MSIE9" outcome="unsupported">filename information not used</tc:result>
      <tc:result for="Opera" outcome="unsupported">filename information not used</tc:result>
      <tc:result for="Safari" outcome="unsupported">filename information not used</tc:result>
      <tc:result for="Konq" outcome="unsupported">filename information not used</tc:result>
      <tc:result for="Chr18" outcome="unsupported">filename information not used (filename derived from title)</tc:result>
    </tc:test-case>

    <tc:test-case code="inlwithfnattach">
      <tc:content-disposition>inline; filename="<b>Not an attachment!</b>"</tc:content-disposition>
      <tc:description>
        'inline', specifying a filename of <code>Not an attachment!</code> -
        this checks for proper parsing for disposition types.
      </tc:description>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="fail">thinks this is an attachment</tc:result>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="inlwithasciifilenamepdf" generate="no">
      <tc:content-disposition>inline; filename="<b>foo.pdf</b>"</tc:content-disposition>
      <tc:description>
        'inline', specifying a filename of <code>foo.pdf</code>
      </tc:description>
      <tc:expectation>
        Some UAs use this filename in a subsequent "save" operation.
        This variation of the test checks whether whatever handles PDF display
        receives the filename information, and acts upon it
        (this was tested with the latest Acrobat Reader plugin, or, in the 
        case of Chrome, using the builtin PDF handler).
      </tc:expectation>
      <tc:result for="FF12" outcome="pass">filename information only used when save happens through UA menu, not PDF plugin (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=433613">Mozilla Bug 433613</a>)</tc:result>
      <tc:result for="FF14" outcome="pass">filename information only used when save happens through UA menu, not PDF plugin (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=433613">Mozilla Bug 433613</a>)</tc:result>
      <tc:result for="FF15" outcome="pass">filename information only used when save happens through UA menu, not PDF plugin (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=433613">Mozilla Bug 433613</a>)</tc:result>
      <tc:result for="MSIE8" outcome="unsupported">filename information not used</tc:result>
      <tc:result for="MSIE9" outcome="unsupported">filename information not used</tc:result>
      <tc:result for="Opera" outcome="pass">filename information only used when save happens through UA menu, not PDF plugin</tc:result>
      <tc:result for="Safari" outcome="unsupported">filename information not used</tc:result>
      <tc:result for="Konq" outcome="unsupported">filename information not used</tc:result>
      <tc:result for="Chr18" outcome="pass">uses the filename in subsequent 'save' operation</tc:result>
    </tc:test-case>

  </tc:group>

  <tc:group name="Content-Disposition: Disposition-Type Attachment" anchor="c-d-attachment">

    <tc:prose>
      <p>
        Various tests relating to the "attachment" disposition type, see 
        <a href="http://greenbytes.de/tech/webdav/rfc6266.html#rfc.section.4.2">Section 4.2 of RFC 6266</a>.
      </p>
    </tc:prose>

    <tc:test-case code="attonly">
      <tc:content-disposition>attachment</tc:content-disposition>
      <tc:description>'attachment' only</tc:description>
      <tc:expectation>UA should offer to download the resource.</tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>
  
    <tc:test-case code="attonlyquoted" type="parseerror">
      <tc:content-disposition>"attachment"</tc:content-disposition>
      <tc:description>'attachment' only, using double quotes</tc:description>
      <tc:expectation>This is invalid syntax, thus the header should be ignored.</tc:expectation>
      <tc:result for="FF12" outcome="warn">apparently parsed either as unknown disposition type, thus defaulting to "attachment", or mistaken for "attachment"</tc:result>
      <tc:result for="FF14" outcome="warn">apparently parsed either as unknown disposition type, thus defaulting to "attachment", or mistaken for "attachment"</tc:result>
      <tc:result for="FF15" outcome="warn">apparently parsed either as unknown disposition type, thus defaulting to "attachment", or mistaken for "attachment"</tc:result>
      <tc:result for="MSIE8" outcome="warn">apparently parsed either as unknown disposition type, thus defaulting to "attachment", or mistaken for "attachment"</tc:result>
      <tc:result for="MSIE9" outcome="warn">apparently parsed either as unknown disposition type, thus defaulting to "attachment", or mistaken for "attachment"</tc:result>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attonly403">
      <tc:content-disposition>attachment</tc:content-disposition>
      <tc:status>403</tc:status>
      <tc:description>'attachment' only, but returned with a 403 status.</tc:description>
      <tc:expectation>UA should report the server status.</tc:expectation>
      <tc:result for="FF12" outcome="pass">but displays a misleading error message (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=364354">Mozilla Bug 364354</a>)</tc:result>
      <tc:result for="FF14" outcome="pass">but displays a misleading error message (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=364354">Mozilla Bug 364354</a>)</tc:result>
      <tc:result for="FF15" outcome="pass">but displays a misleading error message (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=364354">Mozilla Bug 364354</a>)</tc:result>
      <tc:result for="MSIE8" outcome="pass">but displays a misleading error message</tc:result>
      <tc:result for="MSIE9" outcome="pass">error is reported</tc:result>
      <tc:result for="Opera" outcome="fail">saves the content without warning</tc:result>
      <tc:result for="Safari" outcome="fail">saves the content without warning</tc:result>
      <tc:result for="Konq" outcome="warn">displays the content as if the header field wasn't present</tc:result>
      <tc:result for="Chr18" outcome="pass">but displays a misleading error message</tc:result>
    </tc:test-case>

    <tc:test-case code="attonlyucase">
      <tc:content-disposition>ATTACHMENT</tc:content-disposition>
      <tc:description>'ATTACHMENT' only</tc:description>
      <tc:expectation>UA should offer to download the resource.</tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithasciifilename">
      <tc:content-disposition>attachment; filename="<b>foo.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo.html</code>
      </tc:description>
      <tc:expectation>UA should offer to download the resource as "foo.html".</tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>
  
    <tc:test-case code="attwithasciifilename25">
      <tc:content-disposition>attachment; filename="<b>0000000000111111111122222</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>0000000000111111111122222</code> (25 characters)
      </tc:description>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithasciifilename35">
      <tc:content-disposition>attachment; filename="<b>00000000001111111111222222222233333</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>00000000001111111111222222222233333</code> (35 characters)
      </tc:description>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithasciifnescapedchar">
      <tc:content-disposition>attachment; filename="<b>f\oo.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>f\oo.html</code> (the first 'o' being escaped)
      </tc:description>
      <tc:expectation>UA should offer to download the resource as "foo.html".</tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="fail">apparently does not treat the backslash as escape character, replaces it with '_'</tc:result>
      <tc:result for="MSIE9" outcome="fail">apparently does not treat the backslash as escape character, replaces it with '_'</tc:result>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="fail">apparently does not treat the backslash as escape character, replaces it with '-'</tc:result>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithasciifnescapedquote">
      <tc:content-disposition>attachment; filename="<b>\"quoting\" tested.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>\"quoting\" tested.html</code> (using double quotes around "quoting" to test... quoting)
      </tc:description>
      <tc:expectation>UA should offer to download the resource as something like '"quoting" tested.html' (stripping the quotes
      may be ok for security reasons, but getting confused by them is not).</tc:expectation>
      <tc:result for="FF12" outcome="fail">needs to be investigated, apparently double quotes are still replaced with '_'</tc:result>
      <tc:result for="FF14" outcome="fail">needs to be investigated, apparently double quotes are still replaced with '_'</tc:result>
      <tc:result for="FF15" outcome="fail">needs to be investigated, apparently double quotes are still replaced with '_'</tc:result>
      <tc:result for="MSIE8" outcome="fail">apparently does not treat the backslash as escape character, replaces it with '_'</tc:result>
      <tc:result for="MSIE9" outcome="fail">apparently does not treat the backslash as escape character, replaces it with '_'</tc:result>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="fail">apparently does not treat the backslash as escape character, replaces it with '-'</tc:result>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="warn">unquotes properly, but replaces the double quotes with "-"</tc:result>
    </tc:test-case>

    <tc:test-case code="attwithquotedsemicolon">
      <tc:content-disposition>attachment; filename="<b>Here's a semicolon;.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>Here's a semicolon;.html</code> - this checks for proper parsing for parameters. 
      </tc:description>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="fail">thinks the filename is terminated by the semicolon</tc:result>
      <tc:result for="MSIE9" outcome="fail">thinks the filename is terminated by the semicolon</tc:result>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithfilenameandextparam">
      <tc:content-disposition>attachment; foo="bar"; filename="<b>foo.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo.html</code>
        and an extension parameter "foo" which should be ignored
        (see <a href="http://greenbytes.de/tech/webdav/rfc6266.html#rfc.section.4.4">Section 4.4 of RFC 6266</a>.).
      </tc:description>
      <tc:expectation>UA should offer to download the resource as "foo.html".</tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithfilenameandextparamescaped">
      <tc:content-disposition>attachment; foo="\"\\";filename="<b>foo.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo.html</code>
        and an extension parameter "foo" which should be ignored
        (see <a href="http://greenbytes.de/tech/webdav/rfc6266.html#rfc.section.4.4">Section 4.4 of RFC 6266</a>.).
        In comparison to <a href="#attwithfilenameandextparam">attwithfilenameandextparam</a>,
        the extension parameter actually uses backslash-escapes. This tests whether the
        UA properly skips the parameter.
      </tc:description>
      <tc:expectation>UA should offer to download the resource as "foo.html".</tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="fail">trips over the extension parameter (further investigation shows it's caused by the \" sequence)<!-- Apple Bug ID# 8965266 --></tc:result>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithasciifilenameucase">
      <tc:content-disposition>attachment; FILENAME="<b>foo.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo.html</code>
      </tc:description>
      <tc:expectation>UA should offer to download the resource as "foo.html".</tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithasciifilenamenq">
      <tc:content-disposition>attachment; filename=<b>foo.html</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo.html</code> using a token
        instead of a quoted-string.
      </tc:description>
      <tc:expectation>Note that was invalid according to <a href="http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.19.5.1">Section 19.5.1 of RFC 2616</a>.
      </tc:expectation>
      <tc:result for="FF12" outcome="pass">accepts the unquoted value</tc:result>
      <tc:result for="FF14" outcome="pass">accepts the unquoted value</tc:result>
      <tc:result for="FF15" outcome="pass">accepts the unquoted value</tc:result>
      <tc:result for="MSIE8" outcome="pass">accepts the unquoted value</tc:result>
      <tc:result for="MSIE9" outcome="pass">accepts the unquoted value</tc:result>
      <tc:result for="Opera" outcome="pass">accepts the unquoted value</tc:result>
      <tc:result for="Safari" outcome="pass">accepts the unquoted value</tc:result>
      <tc:result for="Konq" outcome="pass">accepts the unquoted value</tc:result>
      <tc:result for="Chr18" outcome="pass">accepts the unquoted value</tc:result>
    </tc:test-case>

    <tc:test-case code="attwithtokfncommanq" type="parseerror">
      <tc:content-disposition>attachment; filename=<b>foo,bar.html</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo,bar.html</code> using a comma despite using token syntax. 
      </tc:description>
      <tc:result for="FF12" outcome="warn">accepts the unquoted value</tc:result>
      <tc:result for="FF14" outcome="warn">accepts the unquoted value</tc:result>
      <tc:result for="FF15" outcome="warn">accepts the unquoted value</tc:result>
      <tc:result for="MSIE8" outcome="warn">accepts the unquoted value</tc:result>
      <tc:result for="MSIE9" outcome="warn">accepts the unquoted value</tc:result>
      <tc:result for="Opera" outcome="warn">accepts the unquoted value</tc:result>
      <tc:result for="Safari" outcome="warn">treats the comma as delimiter and offers to download "foo.html"</tc:result>
      <tc:result for="Konq" outcome="pass">ignores thes header field</tc:result>
      <tc:result for="Chr18" outcome="pass">reports a network error ("Duplicate headers received from server")</tc:result>
    </tc:test-case>

    <tc:test-case code="attwithasciifilenamenqs" type="parseerror">
      <tc:content-disposition>attachment; filename=<b>foo.html</b> ;</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo.html</code> using a token
        instead of a quoted-string, and adding a trailing semicolon.
      </tc:description>
      <tc:expectation>The trailing semicolon makes the header field value
      syntactically incorrect, as no other parameter follows. Thus the
      header field should be ignored.
      </tc:expectation>
      <tc:result for="FF12" outcome="warn">accepts the unquoted value, treats semicolon as delimiter</tc:result>
      <tc:result for="FF14" outcome="warn">accepts the unquoted value, treats semicolon as delimiter</tc:result>
      <tc:result for="FF15" outcome="warn">accepts the unquoted value, treats semicolon as delimiter</tc:result>
      <tc:result for="MSIE8" outcome="warn">accepts the unquoted value, treats semicolon as delimiter</tc:result>
      <tc:result for="MSIE9" outcome="warn">accepts the unquoted value, treats semicolon as delimiter</tc:result>
      <tc:result for="Opera" outcome="warn">accepts the unquoted value, treats semicolon as delimiter</tc:result>
      <tc:result for="Safari" outcome="warn">accepts the unquoted value, treats semicolon as delimiter</tc:result>
      <tc:result for="Konq" outcome="warn">accepts the unquoted value, treats semicolon as delimiter</tc:result>
      <tc:result for="Chr18" outcome="warn">accepts the unquoted value, treats semicolon as delimiter</tc:result>
    </tc:test-case>

    <tc:test-case code="attemptyparam" type="parseerror">
      <tc:content-disposition>attachment; ;filename=foo</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo</code>, but including
        an empty parameter.
      </tc:description>
      <tc:expectation>The empty parameter makes the header field value
      syntactically incorrect, as no other parameter follows. Thus the
      header field should be ignored.
      </tc:expectation>
      <tc:result for="FF12" outcome="warn">skips the missing parameter and sees 'foo'</tc:result>
      <tc:result for="FF14" outcome="warn">skips the missing parameter and sees 'foo'</tc:result>
      <tc:result for="FF15" outcome="warn">skips the missing parameter and sees 'foo'</tc:result>
      <tc:result for="MSIE8" outcome="warn">skips the missing parameter and sees 'foo'</tc:result>
      <tc:result for="MSIE9" outcome="warn">skips the missing parameter and sees 'foo'</tc:result>
      <tc:result for="Opera" outcome="warn">skips the missing parameter and sees 'foo'</tc:result>
      <tc:result for="Safari" outcome="warn">skips the missing parameter and sees 'foo'</tc:result>
      <tc:result for="Konq" outcome="pass">header field ignored</tc:result>
      <tc:result for="Chr18" outcome="warn">skips the missing parameter and sees 'foo'</tc:result>
    </tc:test-case>

    <tc:test-case code="attwithasciifilenamenqws" type="parseerror">
      <tc:content-disposition>attachment; filename=<b>foo bar.html</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo bar.html</code> 
        without using quoting.
      </tc:description>
      <tc:expectation>This is invalid. "token" does not allow whitespace.
      </tc:expectation>
      <tc:result for="FF12" outcome="warn">ignores "bar"</tc:result>
      <tc:result for="FF14" outcome="warn">ignores "bar"</tc:result>
      <tc:result for="FF15" outcome="warn">ignores "bar"</tc:result>
      <tc:result for="MSIE8" outcome="warn">apparently replaces whitespace by "_"</tc:result>
      <tc:result for="MSIE9" outcome="warn">accepts the whitespace as part of the value</tc:result>
      <tc:result for="Opera" outcome="warn">accepts the whitespace as part of the value</tc:result>
      <tc:result for="Safari" outcome="warn">accepts the whitespace as part of the value</tc:result>
      <tc:result for="Konq" outcome="pass">ignores the parameter</tc:result>
      <tc:result for="Chr18" outcome="warn">accepts the whitespace as part of the value</tc:result>
    </tc:test-case>

    <tc:test-case code="attwithfntokensq">
      <tc:content-disposition>attachment; filename=<b>'foo.bar'</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>'foo.bar'</code> using
        single quotes. 
      </tc:description>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass">note that the second quote disappears as the extension gets rewritten</tc:result>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="fail">removes the single quotes</tc:result>
    </tc:test-case>

    <tc:test-case code="attwithisofnplain">
      <tc:content-disposition>attachment; filename="<b>foo-ä.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-ä.html</code>, using plain ISO-8859-1
      </tc:description>
      <tc:expectation>UA should offer to download the resource as "foo-ä.html".</tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>
  
    <tc:test-case code="attwithutf8fnplain">
      <tc:content-disposition>attachment; filename="<b>foo-&#xc3;&#xa4;.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-&#xc3;&#xa4;.html</code>,
        which happens to be <code>foo-ä.html</code> using UTF-8 encoding.
      </tc:description>
      <tc:expectation>UA should offer to download the resource as "foo-&#xc3;&#xa4;.html".
      Displaying "foo-ä.html" instead indicates that the UA tried to be smart by detecting
      something that happens to look like UTF-8.</tc:expectation>
      <tc:result for="FF12" outcome="fail">decodes as UTF-8 (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=588409">Mozilla Bug 588409</a>)</tc:result>
      <tc:result for="FF14" outcome="fail">decodes as UTF-8 (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=588409">Mozilla Bug 588409</a>)</tc:result>
      <tc:result for="FF15" outcome="fail">decodes as UTF-8 (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=588409">Mozilla Bug 588409</a>)</tc:result>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="fail">decodes as UTF-8</tc:result>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="fail">decodes as UTF-8</tc:result>
    </tc:test-case>

    <tc:test-case code="attwithfnrawpctenca">
      <tc:content-disposition>attachment; filename="<b>foo-%41.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-%41.html</code>
      </tc:description>
      <tc:expectation>UA should offer to download the resource as "foo-%41.html".
      Displaying "foo-A.html" instead would indicate that the UA has attempted
      to percent-decode the parameter.
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="fail">displays "foo-A.html"</tc:result>
      <tc:result for="MSIE9" outcome="fail">displays "foo-A.html"</tc:result>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="fail">displays "foo-A.html" (see <a href="http://code.google.com/p/chromium/issues/detail?id=118">Chrome Issue 118</a>)</tc:result>
    </tc:test-case>
  
    <tc:test-case code="attwithfnusingpct">
      <tc:content-disposition>attachment; filename="<b>50%.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>50%.html</code>
      </tc:description>
      <tc:expectation>UA should offer to download the resource as "50%.html".
      This tests how UAs that fails at <a href="#attwithfnrawpctenca">attwithfnrawpctenca</a>
      handle "%" characters that do not start a "% hexdig hexdig" sequence.
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithfnrawpctencaq">
      <tc:content-disposition>attachment; filename="<b>foo-%\41.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-%41.html</code>,
        using an escape character (this tests whether adding an escape
        character inside a %xx sequence can be used to disable the
        non-conformant %xx-unescaping).
      </tc:description>
      <tc:expectation>UA should offer to download the resource as "foo-%41.html".
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="fail">apparently does not treat the backslash as escape character, replaces it with '_'</tc:result>
      <tc:result for="MSIE9" outcome="fail">apparently does not treat the backslash as escape character, replaces it with '_'</tc:result>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="fail">apparently does not treat the backslash as escape character, replaces it with '-'</tc:result>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="fail">saves "foo-%_41.html" (skips the unescaping of "\")</tc:result>
    </tc:test-case>

    <tc:test-case code="attwithnamepct">
      <tc:content-disposition>attachment; name="<b>foo-%41.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a <i>name</i> parameter of <code>foo-%41.html</code>.
        (this test was added to observe the behavior of the (unspecified) treatment of "name" as
        synonym for "filename"; see <a href="http://www.imc.org/ietf-smtp/mail-archive/msg05023.html">Ned Freed's summary</a>
        where this comes from in MIME messages)
      </tc:description>
      <tc:expectation>
        Should be treated as extension parameter, therefore almost any
        behavior is acceptable.
      </tc:expectation>
      <tc:result for="FF12" outcome="pass">displays "foo-%41.html" (support for "name" apparently was added as part of <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=229785">Mozilla Bug 229785</a>)</tc:result>
      <tc:result for="FF14" outcome="pass">displays "foo-%41.html" (support for "name" apparently was added as part of <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=229785">Mozilla Bug 229785</a>)</tc:result>
      <tc:result for="FF15" outcome="pass">displays "foo-%41.html" (support for "name" apparently was added as part of <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=229785">Mozilla Bug 229785</a>)</tc:result>
      <tc:result for="MSIE8" outcome="pass">parameter ignored</tc:result>
      <tc:result for="MSIE9" outcome="pass">parameter ignored</tc:result>
      <tc:result for="Opera" outcome="pass">parameter ignored</tc:result>
      <tc:result for="Safari" outcome="pass">parameter ignored</tc:result>
      <tc:result for="Konq" outcome="pass">parameter ignored</tc:result>
      <tc:result for="Chr18" outcome="pass">displays "foo-A.html"</tc:result>
    </tc:test-case>

    <tc:test-case code="attwithfilenamepctandiso">
      <tc:content-disposition>attachment; filename="<b>ä-%41.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a <i>filename</i> parameter of <code>ä-%41.html</code>.
        (this test was added to observe the behavior when non-ASCII characters
        and percent-hexdig sequences are combined)
      </tc:description>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="fail">displays "ä-A.html"</tc:result>
      <tc:result for="MSIE9" outcome="fail">displays "ä-A.html"</tc:result>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithfnrawpctenclong">
      <tc:content-disposition>attachment; filename="<b>foo-%c3%a4-%e2%82%ac.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-%c3%a4-%e2%82%ac.html</code>, using raw percent encoded UTF-8
        to represent <code>foo-ä-&#x20ac;.html</code>
      </tc:description>
      <tc:expectation>UA should offer to download the resource as "foo-%c3%a4-%e2%82%ac.html".
      Displaying "foo-ä-&#x20ac;.html" instead would indicate that the UA has attempted
      to percent-decode the parameter (using UTF-8). Displaying something else
      would indicate that the UA tried to percent-decode, but used a different encoding.
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="fail">displays "foo-ä-&#x20ac;.html"</tc:result>
      <tc:result for="MSIE9" outcome="fail">displays "foo-ä-&#x20ac;.html"</tc:result>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="fail">displays "foo-ä-&#x20ac;.html" (see <a href="http://code.google.com/p/chromium/issues/detail?id=118">Chrome Issue 118</a>)</tc:result>
    </tc:test-case>

    <tc:test-case code="attwithasciifilenamews1">
      <tc:content-disposition>attachment; filename ="<b>foo.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo.html</code>, with one
        blank space <em>before</em> the equals character.
      </tc:description>
      <tc:expectation>UA should offer to download the resource as "foo.html".</tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwith2filenames" type="invalidsyntax">
      <tc:content-disposition>attachment; filename="<b>foo.html</b>"; filename="<b>bar.html</b>"</tc:content-disposition>
      <tc:description>
        'attachment', specifying two filename parameters. This is invalid
        syntax.
      </tc:description>
      <tc:result for="FF12" outcome="warn">Takes first parameter</tc:result>
      <tc:result for="FF14" outcome="warn">Takes first parameter</tc:result>
      <tc:result for="FF15" outcome="warn">Takes first parameter</tc:result>
      <tc:result for="MSIE8" outcome="warn">Takes first parameter</tc:result>
      <tc:result for="MSIE9" outcome="warn">Takes first parameter</tc:result>
      <tc:result for="Opera" outcome="warn">Takes first parameter</tc:result>
      <tc:result for="Safari" outcome="warn">Takes first parameter</tc:result>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="warn">Takes first parameter</tc:result>
    </tc:test-case>

    <tc:test-case code="attfnbrokentoken"  type="parseerror">
      <tc:content-disposition>attachment; filename=<b>foo[1](2).html</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo[1](2).html</code>, but missing
        the quotes. Also, "[", "]", "(" and ")" are not allowed in the HTTP <a href="http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-latest.html#rfc.section.1.2.2">token</a>
        production.
      </tc:description>
      <tc:expectation>This is invalid according to <a href="http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.19.5.1">Section 19.5.1 of RFC 2616</a>
      and <a href="http://greenbytes.de/tech/webdav/rfc6266.html">RFC 6266</a>,
      so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="warn">accepts the unquoted value</tc:result>
      <tc:result for="FF14" outcome="warn">accepts the unquoted value</tc:result>
      <tc:result for="FF15" outcome="warn">accepts the unquoted value</tc:result>
      <tc:result for="MSIE8" outcome="warn">accepts the unquoted value</tc:result>
      <tc:result for="MSIE9" outcome="warn">accepts the unquoted value</tc:result>
      <tc:result for="Opera" outcome="warn">accepts the unquoted value</tc:result>
      <tc:result for="Safari" outcome="warn">accepts the unquoted value</tc:result>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="warn">accepts the unquoted value</tc:result>
    </tc:test-case>

    <tc:test-case code="attfnbrokentokeniso"  type="parseerror">
      <tc:content-disposition>attachment; filename=<b>foo-ä.html</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-ä.html</code>, but
        missing the quotes.
      </tc:description>
      <tc:expectation>This is invalid, as the umlaut is not a valid token character,
      so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="warn">accepts the umlaut</tc:result>
      <tc:result for="FF14" outcome="warn">accepts the umlaut</tc:result>
      <tc:result for="FF15" outcome="warn">accepts the umlaut</tc:result>
      <tc:result for="MSIE8" outcome="warn">accepts the umlaut</tc:result>
      <tc:result for="MSIE9" outcome="warn">accepts the umlaut</tc:result>
      <tc:result for="Opera" outcome="warn">accepts the umlaut</tc:result>
      <tc:result for="Safari" outcome="warn">accepts the umlaut</tc:result>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="warn">accepts the umlaut</tc:result>
    </tc:test-case>

    <tc:test-case code="attfnbrokentokenutf"  type="parseerror">
      <tc:content-disposition>attachment; filename=<b>foo-&#xc3;&#xa4;.html</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-&#xc3;&#xa4;.html</code>
        (which happens to be <code>foo-ä.html</code> using UTF-8 encoding) but
        missing the quotes.
      </tc:description>
      <tc:expectation>This is invalid, as the umlaut is not a valid token character,
      so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="warn">accepts the umlaut, also sniffs as UTF-8</tc:result>
      <tc:result for="FF14" outcome="warn">accepts the umlaut, also sniffs as UTF-8</tc:result>
      <tc:result for="FF15" outcome="warn">accepts the umlaut, also sniffs as UTF-8</tc:result>
      <tc:result for="MSIE8" outcome="warn">accepts the umlaut</tc:result>
      <tc:result for="MSIE9" outcome="warn">accepts the umlaut</tc:result>
      <tc:result for="Opera" outcome="warn">accepts the umlaut</tc:result>
      <tc:result for="Safari" outcome="warn">accepts the umlaut, also sniffs as UTF-8</tc:result>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="warn">accepts the umlaut, also sniffs as UTF-8</tc:result>
    </tc:test-case>

    <tc:test-case code="attmissingdisposition" type="parseerror">
      <tc:content-disposition>filename=<b>foo.html</b></tc:content-disposition>
      <tc:description>
        Disposition type missing, filename specified.
      </tc:description>
      <tc:expectation>This is invalid, so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="warn">Treated as inline (and filename used in subsequent save operation)</tc:result>
      <tc:result for="FF14" outcome="warn">Treated as inline (and filename used in subsequent save operation)</tc:result>
      <tc:result for="FF15" outcome="warn">Treated as inline (and filename used in subsequent save operation)</tc:result>
      <tc:result for="MSIE8" outcome="pass">Header field ignored</tc:result>
      <tc:result for="MSIE9" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Opera" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Safari" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Konq" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Chr18" outcome="pass">Header field ignored</tc:result>
    </tc:test-case>
  
    <tc:test-case code="attmissingdisposition2" type="parseerror">
      <tc:content-disposition>x=y; filename=<b>foo.html</b></tc:content-disposition>
      <tc:description>
        Disposition type missing, filename specified after extension parameter.
      </tc:description>
      <tc:expectation>This is invalid, so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="fail">Treated as named attachment (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=671204">Mozilla Bug 671204</a>)</tc:result>
      <tc:result for="FF14" outcome="fail">Treated as named attachment (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=671204">Mozilla Bug 671204</a>)</tc:result>
      <tc:result for="FF15" outcome="fail">Treated as named attachment (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=671204">Mozilla Bug 671204</a>)</tc:result>
      <tc:result for="MSIE8" outcome="pass">Header field ignored</tc:result>
      <tc:result for="MSIE9" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Opera" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Safari" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Konq" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Chr18" outcome="pass">Header field ignored</tc:result>
    </tc:test-case>

    <tc:test-case code="attmissingdisposition3" type="parseerror">
      <tc:content-disposition>"foo; filename=bar;baz"; filename=qux</tc:content-disposition>
      <tc:description>
        Disposition type missing, filename "qux". Can it be more broken? (Probably)
      </tc:description>
      <tc:expectation>This is invalid, so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="fail">Sees "qux" (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=671204">Mozilla Bug 671204</a>)</tc:result>
      <tc:result for="FF14" outcome="fail">Sees "qux" (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=671204">Mozilla Bug 671204</a>)</tc:result>
      <tc:result for="FF15" outcome="fail">Sees "qux" (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=671204">Mozilla Bug 671204</a>)</tc:result>
      <tc:result for="MSIE8" outcome="pass">Header field ignored</tc:result>
      <tc:result for="MSIE9" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Opera" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Safari" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Konq" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Chr18" outcome="pass">Header field ignored</tc:result>
    </tc:test-case>

    <tc:test-case code="attmissingdisposition4" type="parseerror">
      <tc:content-disposition>filename=<b>foo.html</b>, filename=<b>bar.html</b></tc:content-disposition>
      <tc:description>
        Disposition type missing, two filenames specified separated by a comma
        (this is syntactically equivalent to have two instances of the header
        with one filename parameter each).
      </tc:description>
      <tc:expectation>This is invalid, so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="pass">Header field ignored</tc:result>
      <tc:result for="FF14" outcome="pass">Header field ignored</tc:result>
      <tc:result for="FF15" outcome="pass">Header field ignored</tc:result>
      <tc:result for="MSIE8" outcome="pass">Header field ignored</tc:result>
      <tc:result for="MSIE9" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Opera" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Safari" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Konq" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Chr18" outcome="pass">reports a network error ("Duplicate headers received from server")</tc:result>
    </tc:test-case>
  
    <tc:test-case code="emptydisposition" type="parseerror">
      <tc:content-disposition>; filename=<b>foo.html</b></tc:content-disposition>
      <tc:description>
        Disposition type missing (but delimiter present), filename specified.
      </tc:description>
      <tc:expectation>This is invalid, so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="pass">Header field ignored</tc:result>
      <tc:result for="FF14" outcome="pass">Header field ignored</tc:result>
      <tc:result for="FF15" outcome="pass">Header field ignored</tc:result>
      <tc:result for="MSIE8" outcome="pass">Header field ignored</tc:result>
      <tc:result for="MSIE9" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Opera" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Safari" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Konq" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Chr18" outcome="pass">Header field ignored</tc:result>
    </tc:test-case>

    <tc:test-case code="attandinline" type="parseerror">
      <tc:content-disposition>inline; attachment; filename=foo.html</tc:content-disposition>
      <tc:description>
        Both disposition types specified.
      </tc:description>
      <tc:expectation>This is invalid, so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="pass">Header field ignored</tc:result>
      <tc:result for="FF14" outcome="pass">Header field ignored</tc:result>
      <tc:result for="FF15" outcome="pass">Header field ignored</tc:result>
      <tc:result for="MSIE8" outcome="fail">Picks 'attachment'</tc:result>
      <tc:result for="MSIE9" outcome="fail">Picks 'attachment'</tc:result>
      <tc:result for="Opera" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Safari" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Konq" outcome="pass">Header field ignored</tc:result>
      <tc:result for="Chr18" outcome="pass">Header field ignored</tc:result>
    </tc:test-case>

    <tc:test-case code="attandinline2" type="parseerror">
      <tc:content-disposition>attachment; inline; filename=foo.html</tc:content-disposition>
      <tc:description>
        Both disposition types specified.
      </tc:description>
      <tc:expectation>This is invalid, so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="warn">treats it as (named) attachment</tc:result>
      <tc:result for="FF14" outcome="warn">treats it as (named) attachment</tc:result>
      <tc:result for="FF15" outcome="warn">treats it as (named) attachment</tc:result>
      <tc:result for="MSIE8" outcome="warn">treats it as (named) attachment</tc:result>
      <tc:result for="MSIE9" outcome="warn">treats it as (named) attachment</tc:result>
      <tc:result for="Opera" outcome="warn">treats it as (named) attachment</tc:result>
      <tc:result for="Safari" outcome="warn">treats it as (named) attachment</tc:result>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="warn">treats it as (unnamed) attachment</tc:result>
    </tc:test-case>

    <tc:test-case code="attbrokenquotedfn" type="parseerror">
      <tc:content-disposition>attachment; filename=<b>"foo.html".txt</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename parameter that is broken (quoted-string followed by more characters). This is invalid syntax. 
      </tc:description>
      <tc:expectation>This is invalid, so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="warn">ignores the stuff after the second double quote</tc:result>
      <tc:result for="FF14" outcome="warn">ignores the stuff after the second double quote</tc:result>
      <tc:result for="FF15" outcome="warn">ignores the stuff after the second double quote</tc:result>
      <tc:result for="MSIE8" outcome="warn">treats the suffix as part of the filename</tc:result>
      <tc:result for="MSIE9" outcome="warn">treats the suffix as part of the filename</tc:result>
      <tc:result for="Opera" outcome="warn">ignores the stuff after the second double quote</tc:result>
      <tc:result for="Safari" outcome="warn">treats the suffix as part of the filename</tc:result>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="warn">replaces second double quote by "-"</tc:result>
    </tc:test-case>

    <tc:test-case code="attbrokenquotedfn2" type="parseerror">
      <tc:content-disposition>attachment; filename=<b>"bar</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename parameter that is broken (missing ending double quote). This is invalid syntax. 
      </tc:description>
      <tc:expectation>This is invalid, so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="warn">accepts the filename parameter as if complete (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=686198">Mozilla Bug 686198</a>)</tc:result>
      <tc:result for="FF14" outcome="warn">accepts the filename parameter as if complete (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=686198">Mozilla Bug 686198</a>)</tc:result>
      <tc:result for="FF15" outcome="warn">accepts the filename parameter as if complete (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=686198">Mozilla Bug 686198</a>)</tc:result>
      <tc:result for="MSIE8" outcome="warn">accepts the filename parameter as if complete</tc:result>
      <tc:result for="MSIE9" outcome="warn">accepts the filename parameter as if complete</tc:result>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="warn">appears to see the token form, and derives ""bar.html" (note the leading double quote)</tc:result>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="warn">accepts the filename parameter as if complete</tc:result>
    </tc:test-case>

    <tc:test-case code="attbrokenquotedfn3" type="parseerror">
      <tc:content-disposition>attachment; filename=<b>foo"bar;baz"qux</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename parameter that is broken (disallowed characters in token syntax). This is invalid syntax. 
      </tc:description>
      <tc:expectation>This is invalid, so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="warn">sees "foo_bar" (apparently substituting the double quote, and truncating at the semicolon)</tc:result>
      <tc:result for="FF14" outcome="warn">sees "foo_bar" (apparently substituting the double quote, and truncating at the semicolon)</tc:result>
      <tc:result for="FF15" outcome="warn">sees "foo_bar" (apparently substituting the double quote, and truncating at the semicolon)</tc:result>
      <tc:result for="MSIE8" outcome="warn">sees "foo_bar" (apparently substituting the double quote, and truncating at the semicolon)</tc:result>
      <tc:result for="MSIE9" outcome="warn">sees "foo_bar" (apparently substituting the double quote, and truncating at the semicolon)</tc:result>
      <tc:result for="Opera" outcome="warn">sees "foo"bar;baz"qux" (accepts all characters inside the token?)</tc:result>
      <tc:result for="Safari" outcome="warn">sees "foo"bar;baz"qux" (accepts all characters inside the token?)</tc:result>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="warn">sees "foo-bar;baz"qux" (accepts all characters inside the token?)</tc:result>
    </tc:test-case>

    <tc:test-case code="attmultinstances" type="parseerror">
      <tc:content-disposition>attachment; filename=foo.html<b>, attachment; filename=bar.html</b></tc:content-disposition>
      <tc:description>
        'attachment', two comma-separated instances of the header field. As Content-Disposition doesn't use a
        list-style syntax, this is invalid syntax
        and, according to <a href="http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.4.2.p.5">RFC 2616, Section 4.2</a>,
        roughly equivalent to having two separate header field instances.
      </tc:description>
      <tc:expectation>This is invalid, so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="warn">sees "bar.html" (picking the second value, see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=480100">Mozilla Bug 480100</a>)</tc:result>
      <tc:result for="FF14" outcome="warn">sees "bar.html" (picking the second value, see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=480100">Mozilla Bug 480100</a>)</tc:result>
      <tc:result for="FF15" outcome="warn">sees "bar.html" (picking the second value, see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=480100">Mozilla Bug 480100</a>)</tc:result>
      <tc:result for="MSIE8" outcome="warn">sees "foo[1].html, attachment"</tc:result>
      <tc:result for="MSIE9" outcome="warn">sees "foo[1].html, attachment"</tc:result>
      <tc:result for="Opera" outcome="warn">sees "foo.htm"</tc:result>
      <tc:result for="Safari" outcome="warn">sees "foo.html, attachment.html"</tc:result>
      <tc:result for="Konq" outcome="warn">sees "bar.html"</tc:result>
      <tc:result for="Chr18" outcome="pass">reports a network error ("Duplicate headers received from server")</tc:result>
    </tc:test-case>

    <tc:test-case code="attmissingdelim" type="parseerror">
      <tc:content-disposition>attachment; <b>foo=foo filename=bar</b></tc:content-disposition>
      <tc:description>
        Uses two parameters, but the mandatory delimiter ";" is missing.
      </tc:description>
      <tc:expectation>This is invalid, so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="warn">sees "bar"</tc:result>
      <tc:result for="FF14" outcome="warn">sees "bar"</tc:result>
      <tc:result for="FF15" outcome="warn">sees "bar"</tc:result>
      <tc:result for="MSIE8" outcome="warn">sees unnamed attachment</tc:result>
      <tc:result for="MSIE9" outcome="warn">sees unnamed attachment</tc:result>
      <tc:result for="Opera" outcome="warn">sees unnamed attachment</tc:result>
      <tc:result for="Safari" outcome="warn">sees unnamed attachment</tc:result>
      <tc:result for="Konq" outcome="warn">sees unnamed attachment</tc:result>
      <tc:result for="Chr18" outcome="warn">sees unnamed attachment</tc:result>
    </tc:test-case>

    <tc:test-case code="attreversed" type="parseerror">
      <tc:content-disposition>filename=foo.html<b>; attachment</b></tc:content-disposition>
      <tc:description>
        filename parameter and disposion type reversed.
      </tc:description>
      <tc:expectation>This is invalid, so UAs should ignore it.</tc:expectation>
      <tc:result for="FF12" outcome="pass">(but see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=263933">Mozilla Bug 263933</a>)</tc:result>
      <tc:result for="FF14" outcome="pass">(but see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=263933">Mozilla Bug 263933</a>)</tc:result>
      <tc:result for="FF15" outcome="pass">(but see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=263933">Mozilla Bug 263933</a>)</tc:result>
      <tc:result for="MSIE8" outcome="warn">treated as named attachment</tc:result>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attconfusedparam">
      <tc:content-disposition>attachment; xfilename=<b>foo.html</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying an "xfilename" parameter. 
      </tc:description>
      <tc:expectation>Should be treated as unnamed attachment.</tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attabspath">
      <tc:content-disposition>attachment; filename=<b>"/foo.html"</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying an absolute filename in the filesystem root. 
      </tc:description>
      <tc:expectation>Either ignore the filename altogether, or discard the path information.</tc:expectation>
      <tc:result for="FF12" outcome="pass">Replaces the path separator with "_".</tc:result>
      <tc:result for="FF14" outcome="pass">Replaces the path separator with "_".</tc:result>
      <tc:result for="FF15" outcome="pass">Replaces the path separator with "_".</tc:result>
      <tc:result for="MSIE8" outcome="pass">Replaces the path separator with "_".</tc:result>
      <tc:result for="MSIE9" outcome="pass">Replaces the path separator with "_".</tc:result>
      <tc:result for="Opera" outcome="pass">Strips the path separator.</tc:result>
      <tc:result for="Safari" outcome="pass">Replaces the path separator with "-".</tc:result>
      <tc:result for="Konq" outcome="pass">Strips the path separator.</tc:result>
      <tc:result for="Chr18" outcome="pass">Replaces the path separator with "_".</tc:result>
    </tc:test-case>
    
    <tc:test-case code="attabspathwin">
      <tc:content-disposition>attachment; filename=<b>"\\foo.html"</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying an absolute filename in the filesystem root. 
      </tc:description>
      <tc:expectation>Either ignore the filename altogether, or discard the path information.</tc:expectation>
      <tc:annotation>
      Note that test results under Operating Systems other than Windows vary (see
      <a href="http://lists.w3.org/Archives/Public/ietf-http-wg/2011JanMar/0112.html">http://lists.w3.org/Archives/Public/ietf-http-wg/2011JanMar/0112.html</a>);
      apparently some UAs consider the backslash a legitimate filename character.
      </tc:annotation>
      <tc:result for="FF12" outcome="pass">Replaces the path separator with "_".</tc:result>
      <tc:result for="FF14" outcome="pass">Replaces the path separator with "_".</tc:result>
      <tc:result for="FF15" outcome="pass">Replaces the path separator with "_".</tc:result>
      <tc:result for="MSIE8" outcome="pass">Replaces the path separator with "__"; apparently processing raw "\" characters instead of the unescaped quoted-string.</tc:result>
      <tc:result for="MSIE9" outcome="pass">Replaces the path separator with "__"; apparently processing raw "\" characters instead of the unescaped quoted-string.</tc:result>
      <tc:result for="Opera" outcome="pass">Strips the path separator.</tc:result>
      <tc:result for="Safari" outcome="pass">Replaces the path separator with "--"; apparently processing raw "\" characters instead of the unescaped quoted-string.</tc:result>
      <tc:result for="Konq" outcome="pass">Strips the platform-specific path separator.</tc:result>
      <tc:result for="Chr18" outcome="pass">Replaces the path separator with "_".</tc:result>
    </tc:test-case>

    
  </tc:group>

  <tc:group name="Content-Disposition: Additional Parameters" anchor="c-d-parms" optional="true">
    <tc:prose>
      <p>
        Various tests relating to the additional parameters defined in 
        <a href="http://greenbytes.de/tech/webdav/rfc2183.html#rfc.section.2">Section 2 of RFC 2183</a>.
      </p>
    </tc:prose>

    <tc:test-case code="attcdate">
      <tc:content-disposition>attachment; <b>creation-date="Wed, 12 Feb 1997 16:29:51 -0500"</b></tc:content-disposition>
      <tc:description>'attachment', plus creation-date (see <a href="http://greenbytes.de/tech/webdav/rfc2183.html#rfc.section.2.4">Section 2.4 of RFC 2183</a>)</tc:description>
      <tc:expectation>UA should offer to download the resource. When doing so,
      the creation date should be set to 12 Feb 1997.</tc:expectation>
      <tc:result for="FF12" outcome="unsupported">seems to ignore the parameter (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=531353">Mozilla Bug 531353</a>)</tc:result>
      <tc:result for="FF14" outcome="unsupported">seems to ignore the parameter (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=531353">Mozilla Bug 531353</a>)</tc:result>
      <tc:result for="FF15" outcome="unsupported">seems to ignore the parameter (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=531353">Mozilla Bug 531353</a>)</tc:result>
      <tc:result for="MSIE8" outcome="unsupported">seems to ignore the parameter</tc:result>
      <tc:result for="MSIE9" outcome="unsupported">seems to ignore the parameter</tc:result>
      <tc:result for="Opera" outcome="unsupported">seems to ignore the parameter</tc:result>
      <tc:result for="Safari" outcome="unsupported">seems to ignore the parameter</tc:result>
      <tc:result for="Konq" outcome="unsupported">seems to ignore the parameter</tc:result>
      <tc:result for="Chr18" outcome="unsupported">seems to ignore the parameter</tc:result>
    </tc:test-case>

    <tc:test-case code="attmdate">
      <tc:content-disposition>attachment; <b>modification-date="Wed, 12 Feb 1997 16:29:51 -0500"</b></tc:content-disposition>
      <tc:description>'attachment', plus modification-date (see <a href="http://greenbytes.de/tech/webdav/rfc2183.html#rfc.section.2.5">Section 2.5 of RFC 2183</a>)</tc:description>
      <tc:expectation>UA should offer to download the resource. When doing so,
      the modification date should be set to 12 Feb 1997.</tc:expectation>
      <tc:result for="FF12" outcome="unsupported">seems to ignore the parameter (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=531353">Mozilla Bug 531353</a>)</tc:result>
      <tc:result for="FF14" outcome="unsupported">seems to ignore the parameter (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=531353">Mozilla Bug 531353</a>)</tc:result>
      <tc:result for="FF15" outcome="unsupported">seems to ignore the parameter (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=531353">Mozilla Bug 531353</a>)</tc:result>
      <tc:result for="MSIE8" outcome="unsupported">seems to ignore the parameter</tc:result>
      <tc:result for="MSIE9" outcome="unsupported">seems to ignore the parameter</tc:result>
      <tc:result for="Opera" outcome="unsupported">seems to ignore the parameter</tc:result>
      <tc:result for="Safari" outcome="unsupported">seems to ignore the parameter</tc:result>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="unsupported">seems to ignore the parameter</tc:result>
    </tc:test-case>

  </tc:group>

  <tc:group name="Content-Disposition: Disposition-Type Extension" anchor="c-d-extension">

    <tc:prose>
      <p>
        A test checking behavior for disposition type extensions,
        which should be treated as "attachment", see 
        <a href="http://greenbytes.de/tech/webdav/rfc6266.html#rfc.section.4.2">Section 4.2 of RFC 6266</a>.
      </p>
    </tc:prose>
  
    <tc:test-case code="dispext">
      <tc:content-disposition>foobar</tc:content-disposition>
      <tc:description>'foobar' only</tc:description>
      <tc:expectation>This should be equivalent to using "attachment".</tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="fail">does not treat it as 'attachment'</tc:result>
      <tc:result for="MSIE9" outcome="fail">does not treat it as 'attachment'</tc:result>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="fail">does not treat it as 'attachment'<!-- Apple Bug ID# 8970728 --></tc:result>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="dispextbadfn">
      <tc:content-disposition>attachment; example="<b>filename=example.txt</b>"</tc:content-disposition>
      <tc:description>'attachment', with no filename parameter</tc:description>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

  </tc:group>

  <tc:group name="RFC 2231/5987 Encoding: Character Sets" anchor="encoding-2231-char">
  
    <tc:prose>
      <p>
        Various tests using the parameter value encoding defined
        in <a href="http://greenbytes.de/tech/webdav/rfc5987.html">RFC 5987</a>.
      </p>
    </tc:prose>

    <tc:test-case code="attwithisofn2231iso">
      <tc:content-disposition>attachment; filename*=<b>iso-8859-1''foo-%E4.html</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-ä.html</code>, using RFC2231/5987 encoded ISO-8859-1
      </tc:description>
      <tc:expectation>UA should offer to download the resource as "foo-ä.html".
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="fail">does not accept ISO-8859-1</tc:result>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>
  
    <tc:test-case code="attwithfn2231utf8">
      <tc:content-disposition>attachment; filename*=<b>UTF-8''foo-%c3%a4-%e2%82%ac.html</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-ä-&#x20ac;.html</code>, using RFC2231/5987 encoded UTF-8
      </tc:description>
      <tc:expectation>UA should offer to download the resource as "foo-ä-&#x20ac;.html".
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>
  
    <tc:test-case code="attwithfn2231noc">
      <tc:content-disposition>attachment; filename*=<b>''foo-%c3%a4-%e2%82%ac.html</b></tc:content-disposition>
      <tc:description>
        Behavior is undefined in RFC 2231, the charset part is missing, although UTF-8 was used.
      </tc:description>
      <tc:result for="FF12" outcome="warn">decodes as UTF-8 (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=685192">Mozilla Bug 685192</a>)</tc:result>
      <tc:result for="FF14" outcome="warn">decodes as UTF-8 (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=685192">Mozilla Bug 685192</a>)</tc:result>
      <tc:result for="FF15" outcome="warn">decodes as UTF-8 (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=685192">Mozilla Bug 685192</a>)</tc:result>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="warn">decodes as 8bit encoding (ISO-8859-1?)</tc:result>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass">ignores the parameter</tc:result>
      <tc:result for="Chr18" outcome="pass">ignores the parameter</tc:result>
    </tc:test-case>

    <tc:test-case code="attwithfn2231utf8comp">
      <tc:content-disposition>attachment; filename*=<b>UTF-8''foo-a%cc%88.html</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-ä.html</code>, using RFC2231 encoded UTF-8, but
        choosing the decomposed form (lowercase a plus COMBINING DIAERESIS) --
        on a Windows target system, this should be translated to the preferred
        Unicode normal form (composed).
      </tc:description>
      <tc:expectation>UA should offer to download the resource as "foo-ä.html".
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithfn2231utf8-bad" type="invalid">
      <tc:content-disposition>attachment; filename*=<b>iso-8859-1''foo-%c3%a4-%e2%82%ac.html</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-ä-&#x20ac;.html</code>, using RFC2231 encoded UTF-8, but declaring ISO-8859-1
      </tc:description>
      <tc:expectation>
        The octet %82 does not represent a valid ISO-8859-1 code point, so
        the UA should really ignore the parameter.
      </tc:expectation>
      <tc:result for="FF12" outcome="fail">falls back to UTF-8  (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=693806"><del>Mozilla Bug 693806</del></a>)</tc:result>
      <tc:result for="FF14" outcome="fail">falls back to UTF-8  (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=693806"><del>Mozilla Bug 693806</del></a>)</tc:result>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="warn">displays the raw octet sequence as if it was ISO-8859-1 (which is internally 
      treated as windows-1252, which <em>does</em> allow %82)</tc:result>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="warn">displays the raw octet sequence as if it was ISO-8859-1</tc:result>
    </tc:test-case>
  
    <tc:test-case code="attwithfn2231iso-bad" type="invalid">
      <tc:content-disposition>attachment; filename*=<b>utf-8''foo-%E4.html</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code><code>foo-ä.html</code></code>, using RFC2231 encoded ISO-8859-1, but declaring UTF-8
      </tc:description>
      <tc:expectation>
        The octet %E4 does not represent a valid UTF-8 octet sequence, so
        the UA should really ignore the parameter.
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="warn">detects "foo-%E4.html"</tc:result>
      <tc:result for="Opera" outcome="warn">apparently falls back to ISO-8859-1</tc:result>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass">seems to insert a replacement character</tc:result>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithfn2231ws1" type="parseerror">
      <tc:content-disposition>attachment; filename<b> *=</b>UTF-8''foo-%c3%a4.html</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-ä.html</code>, using RFC2231 encoded UTF-8, with whitespace before "*="
      </tc:description>
      <tc:expectation>
        The parameter is invalid, thus should be ignored.
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithfn2231ws2">
      <tc:content-disposition>attachment; filename<b>*= </b>UTF-8''foo-%c3%a4.html</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-ä.html</code>, using RFC2231 encoded UTF-8, with whitespace after "*="
      </tc:description>
      <tc:expectation>
        UA should offer to download the resource as "foo-ä.html".
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithfn2231ws3">
      <tc:content-disposition>attachment; filename<b>* =</b>UTF-8''foo-%c3%a4.html</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-ä.html</code>, using RFC2231 encoded UTF-8, with whitespace inside "* ="
      </tc:description>
      <tc:expectation>
        UA should offer to download the resource as "foo-ä.html".
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithfn2231quot" type="invalid">
      <tc:content-disposition>attachment; filename*=<b>"</b>UTF-8''foo-%c3%a4.html<b>"</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-ä.html</code>, using RFC2231 encoded UTF-8, with double quotes
        around the parameter value.
      </tc:description>
      <tc:expectation>
        The parameter is invalid, thus should be ignored.
      </tc:expectation>
      <tc:result for="FF12" outcome="warn">accepts the encoding despite double quotes not being allowed here (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=651185">Mozilla Bug 651185</a>)</tc:result>
      <tc:result for="FF14" outcome="warn">accepts the encoding despite double quotes not being allowed here (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=651185">Mozilla Bug 651185</a>)</tc:result>
      <tc:result for="FF15" outcome="warn">accepts the encoding despite double quotes not being allowed here (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=651185">Mozilla Bug 651185</a>)</tc:result>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithfn2231quot2" type="invalid">
      <tc:content-disposition>attachment; filename*=<b>"</b>foo%20bar.html<b>"</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo bar.html</code>, using "filename*", but missing
        character encoding and language (this replicates a bug in MS Exchange 2010, see
        <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=704989">Mozilla Bug 704989</a>).
      </tc:description>
      <tc:expectation>
        The parameter is invalid, thus should be ignored.
      </tc:expectation>
      <tc:result for="FF12" outcome="warn">processes the parameter despite broken quotes and missing delimiters (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=651185">Mozilla Bug 651185</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=685192">Mozilla Bug 685192</a>, and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=692574">Mozilla Bug 692574</a>)</tc:result>
      <tc:result for="FF14" outcome="warn">processes the parameter despite broken quotes and missing delimiters (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=651185">Mozilla Bug 651185</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=685192">Mozilla Bug 685192</a>, and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=692574">Mozilla Bug 692574</a>)</tc:result>
      <tc:result for="FF15" outcome="warn">processes the parameter despite broken quotes and missing delimiters (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=651185">Mozilla Bug 651185</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=685192">Mozilla Bug 685192</a>, and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=692574">Mozilla Bug 692574</a>)</tc:result>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithfn2231singleqmissing" type="invalid">
      <tc:content-disposition>attachment; filename*=UTF-8'foo-%c3%a4.html</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-ä.html</code>, using RFC2231 encoded UTF-8, but a single quote is missing.
      </tc:description>
      <tc:expectation>
        The parameter is invalid, thus should be ignored.
      </tc:expectation>
      <tc:result for="FF12" outcome="warn">tolerates the missing single quote (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=692574">Mozilla Bug 692574</a>)</tc:result>
      <tc:result for="FF14" outcome="warn">tolerates the missing single quote (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=692574">Mozilla Bug 692574</a>)</tc:result>
      <tc:result for="FF15" outcome="warn">tolerates the missing single quote (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=692574">Mozilla Bug 692574</a>)</tc:result>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithfn2231nbadpct1" type="invalid">
      <tc:content-disposition>attachment; filename*=UTF-8''foo%</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo%</code>, using RFC2231 encoded UTF-8, with a single "%" at the end.
      </tc:description>
      <tc:expectation>
        The parameter is invalid, thus should be ignored.
      </tc:expectation>
      <tc:result for="FF12" outcome="warn">displays "foo%"</tc:result>
      <tc:result for="FF14" outcome="warn">displays "foo%"</tc:result>
      <tc:result for="FF15" outcome="warn">displays "foo%"</tc:result>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="warn">displays "foo%"</tc:result>
      <tc:result for="Opera" outcome="warn">displays "foo%"</tc:result>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="warn">displays "foo%"</tc:result>
    </tc:test-case>

    <tc:test-case code="attwithfn2231nbadpct2" type="invalid">
      <tc:content-disposition>attachment; filename*=UTF-8''f%oo.html</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>f%oo.html</code>, using RFC2231 encoded UTF-8, with a "%" not starting a percent-escape.
      </tc:description>
      <tc:expectation>
        The parameter is invalid, thus should be ignored.
      </tc:expectation>
      <tc:result for="FF12" outcome="warn">displays "f%oo.html"</tc:result>
      <tc:result for="FF14" outcome="warn">displays "f%oo.html"</tc:result>
      <tc:result for="FF15" outcome="warn">displays "f%oo.html"</tc:result>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="warn">displays "f%oo.html"</tc:result>
      <tc:result for="Opera" outcome="warn">displays "f%oo.html"</tc:result>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass">ignores the filename parameter</tc:result>
      <tc:result for="Chr18" outcome="warn">displays "f%oo.html"</tc:result>
    </tc:test-case>

    <tc:test-case code="attwithfn2231dpct">
      <tc:content-disposition>attachment; filename*=UTF-8''A-<b>%25</b>41.html</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>A-%41.html</code>, using RFC2231 encoded UTF-8.        
      </tc:description>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

    <tc:test-case code="attwithfn2231abspathdisguised">
      <tc:content-disposition>attachment; filename*=UTF-8''%5cfoo.html</tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>\foo.html</code>, using RFC2231 encoded UTF-8.        
      </tc:description>
      <tc:result for="FF12" outcome="pass">substitutes "\" by "_"</tc:result>
      <tc:result for="FF14" outcome="pass">substitutes "\" by "_"</tc:result>
      <tc:result for="FF15" outcome="pass">substitutes "\" by "_"</tc:result>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="pass">substitutes "\" by "_"</tc:result>
      <tc:result for="Opera" outcome="pass">strips the "\"</tc:result>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass">Strips the platform-specific path separator.</tc:result>
      <tc:result for="Chr18" outcome="pass">substitutes "\" by "_"</tc:result>
    </tc:test-case>
  </tc:group>
  
  <tc:group name="RFC2231 Encoding: Continuations" anchor="encoding-2231-cont" optional="true">
  
    <tc:prose>
      <p>
        Various tests using the parameter value continuation defined
        in <a href="http://greenbytes.de/tech/webdav/rfc2231.html#rfc.section.3">Section 3 of RFC 2231</a>.
      </p>
    </tc:prose>

    <tc:test-case code="attfncont">
      <tc:content-disposition>attachment; filename*0=<b>"foo."</b>; filename*1=<b>"html"</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo.html</code>, using RFC2231-style parameter continuations.
      </tc:description>
      <tc:expectation>
        UA should offer to download the resource as "foo.html".
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="unsupported"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="unsupported"/>
    </tc:test-case>

    <tc:test-case code="attfncontqs">
      <tc:content-disposition>attachment; filename*0=<b>"foo"</b>; filename*1=<b>"\b\a\r.html"</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foobar.html</code>, using RFC2231-style parameter continuations,
        with the continuation using quoted-string syntax.
      </tc:description>
      <tc:expectation>
        UA should offer to download the resource as "foobar.html".
      </tc:expectation>
      <tc:result for="FF12" outcome="fail">fails to apply quoted-string unescaping, replaces backquotes by underscores (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=730574">Mozilla Bug 730574</a>)</tc:result>
      <tc:result for="FF14" outcome="fail">fails to apply quoted-string unescaping, replaces backquotes by underscores (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=730574">Mozilla Bug 730574</a>)</tc:result>
      <tc:result for="FF15" outcome="fail">fails to apply quoted-string unescaping, replaces backquotes by underscores (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=730574">Mozilla Bug 730574</a>)</tc:result>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="unsupported"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="unsupported"/>
    </tc:test-case>

    <tc:test-case code="attfncontenc">
      <tc:content-disposition>attachment; filename*0*=<b>UTF-8''foo-%c3%a4</b>; filename*1=<b>".html"</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-ä.html</code>, using both RFC2231-style parameter continuations
        and UTF-8 encoding.
      </tc:description>
      <tc:expectation>
        UA should offer to download the resource as "foo-ä.html".
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="unsupported"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="unsupported"/>
    </tc:test-case>

    <tc:test-case code="attfncontlz">
      <tc:content-disposition>attachment; filename*0=<b>"foo"</b>; filename*01=<b>"bar"</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo</code> (the parameter filename*01 should be ignored because of the leading zero)
      </tc:description>
      <tc:expectation>
        UA should offer to download the resource as "foo".
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="unsupported"/>
      <tc:result for="Opera" outcome="warn">accepts leading zeros</tc:result>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="unsupported"/>
    </tc:test-case>

    <tc:test-case code="attfncontnc">
      <tc:content-disposition>attachment; filename*0=<b>"foo"</b>; filename*2=<b>"bar"</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo</code> (the parameter filename*2 should be ignored because there's no filename*1 parameter)
      </tc:description>
      <tc:expectation>
        UA should offer to download the resource as "foo".
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="unsupported"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="unsupported"/>
    </tc:test-case>

    <tc:test-case code="attfnconts1">
      <tc:content-disposition>attachment; filename*1=<b>"foo."</b>; filename*2=<b>"html"</b></tc:content-disposition>
      <tc:description>
        'attachment' (the filename* parameters should be ignored because filename*0 is missing)
      </tc:description>
      <tc:expectation>
        UA should offer to download, not getting the filename from the header.
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="unsupported"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="unsupported"/>
    </tc:test-case>

    <tc:test-case code="attfncontord">
      <tc:content-disposition>attachment; filename*1=<b>"bar"</b>; filename*0=<b>"foo"</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foobar</code>
      </tc:description>
      <tc:expectation>
        UA should offer to download the resource as "foobar".
      </tc:expectation>
      <tc:result for="FF12" outcome="fail">parameters apparently are expected to be ordered (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=384571"><del>Mozilla Bug 384571</del></a>)</tc:result>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="unsupported"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="unsupported"/>
    </tc:test-case>

  </tc:group>

  <tc:group name="RFC2231 Encoding: Fallback Behaviour" anchor="encoding-2231-fb">
  
    <tc:prose>
      <p>
        This tests how the UA behaves when the same parameter name appear
        both in traditional and RFC 2231/5987 extended format.
      </p>
    </tc:prose>

    <tc:test-case code="attfnboth">
      <tc:content-disposition>attachment; filename="<b>foo-ae.html</b>"; filename*=<b>UTF-8''foo-%c3%a4.html</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-ae.html</code> in
        the traditional format, and <code>foo-ä.html</code> in RFC2231 format.
      </tc:description>
      <tc:expectation>
        <a href="http://greenbytes.de/tech/webdav/rfc5987.html#rfc.section.4.2">Section 4.2 of RFC 5987</a>
        and
        <a href="http://greenbytes.de/tech/webdav/rfc6266.html#rfc.section.4.3">Section 4.3 of RFC 6266</a>
        suggest that the RFC 2231/5987 encoded parameter ("filename*") should
        take precedence when understood.
      </tc:expectation>
      <tc:result for="FF12" outcome="pass">picks the RFC 2231 encoded value</tc:result>
      <tc:result for="FF14" outcome="pass">picks the RFC 2231 encoded value</tc:result>
      <tc:result for="FF15" outcome="pass">picks the RFC 2231 encoded value</tc:result>
      <tc:result for="MSIE8" outcome="unsupported">picks the traditionally encoded value -- the first of both</tc:result>
      <tc:result for="MSIE9" outcome="pass">picks the RFC 2231 encoded value</tc:result>
      <tc:result for="Opera" outcome="pass">picks the RFC 2231 encoded value<!-- DSK-311040@bugs.opera.com --></tc:result>
      <tc:result for="Safari" outcome="unsupported">picks the traditionally encoded value -- the first of both<!-- https://bugs.webkit.org/show_bug.cgi?id=53852 --></tc:result>
      <tc:result for="Konq" outcome="pass">picks the RFC 2231 encoded value</tc:result>
      <tc:result for="Chr18" outcome="pass">picks the RFC 2231 encoded value</tc:result>
    </tc:test-case>

    <tc:test-case code="attfnboth2">
      <tc:content-disposition>attachment; filename*=<b>UTF-8''foo-%c3%a4.html</b>; filename=<b>"foo-ae.html"</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>foo-ae.html</code> in
        the traditional format, and <code>foo-ä.html</code> in RFC2231 format.
      </tc:description>
      <tc:expectation>
        <a href="http://greenbytes.de/tech/webdav/rfc5987.html#rfc.section.4.2">Section 4.2 of RFC 5987</a>
        and
        <a href="http://greenbytes.de/tech/webdav/rfc6266.html#rfc.section.4.3">Section 4.3 of RFC 6266</a>
        suggest that the RFC 2231/5987 encoded parameter ("filename*") should
        take precedence when understood.
      </tc:expectation>
      <tc:result for="FF12" outcome="pass">picks the RFC 2231 encoded value</tc:result>
      <tc:result for="FF14" outcome="pass">picks the RFC 2231 encoded value</tc:result>
      <tc:result for="FF15" outcome="pass">picks the RFC 2231 encoded value</tc:result>
      <tc:result for="MSIE8" outcome="fail">ignores the parameter (this indicates a parsing bug)</tc:result>
      <tc:result for="MSIE9" outcome="pass">picks the RFC 2231 encoded value</tc:result>
      <tc:result for="Opera" outcome="pass">picks the RFC 2231 encoded value</tc:result>
      <tc:result for="Safari" outcome="unsupported">picks the traditionally encoded value -- the one it understands</tc:result>
      <tc:result for="Konq" outcome="pass">picks the RFC 2231 encoded value</tc:result>
      <tc:result for="Chr18" outcome="pass">picks the RFC 2231 encoded value</tc:result>
    </tc:test-case>

    <tc:test-case code="attfnboth3">
      <tc:content-disposition>attachment; filename*0*=<b>ISO-8859-15''euro-sign%3d%a4</b>; filename*=<b>ISO-8859-1''currency-sign%3d%a4</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a filename of <code>currency-sign=&#xa4;</code> in
        the simple RFC2231/5987 format, and <code>euro-sign=&#x20ac;</code> in RFC2231-with-continuations format.
      </tc:description>
      <tc:expectation>
        A UA that supports could pick either, or ignore both because of the
        ambiguity.
      </tc:expectation>
      <tc:result for="FF12" outcome="pass">uses RFC5987 simple format</tc:result>
      <tc:result for="FF14" outcome="pass">uses RFC5987 simple format</tc:result>
      <tc:result for="FF15" outcome="pass">uses RFC5987 simple format</tc:result>
      <tc:result for="MSIE8" outcome="unsupported"/>
      <tc:result for="MSIE9" outcome="pass">ignores both</tc:result>
      <tc:result for="Opera" outcome="pass">uses RFC2231/cont format (the first one)</tc:result>
      <tc:result for="Safari" outcome="unsupported"/>
      <tc:result for="Konq" outcome="pass">uses RFC2231/cont format (the first one)</tc:result>
      <tc:result for="Chr18" outcome="pass">uses RFC5987 simple format</tc:result>
    </tc:test-case>

    <tc:test-case code="attnewandfn">
      <tc:content-disposition>attachment; foobar=x; filename=<b>"foo.html"</b></tc:content-disposition>
      <tc:description>
        'attachment', specifying a new parameter "foobar", plus a filename of <code>foo.html</code> in
        the traditional format.
      </tc:description>
      <tc:expectation>
        "foobar" should be ignored, thus "foo.html" be used as filename (this tests whether the UA properly skips unknown parameters).
      </tc:expectation>
      <tc:result for="FF12" outcome="pass"/>
      <tc:result for="FF14" outcome="pass"/>
      <tc:result for="FF15" outcome="pass"/>
      <tc:result for="MSIE8" outcome="pass"/>
      <tc:result for="MSIE9" outcome="pass"/>
      <tc:result for="Opera" outcome="pass"/>
      <tc:result for="Safari" outcome="pass"/>
      <tc:result for="Konq" outcome="pass"/>
      <tc:result for="Chr18" outcome="pass"/>
    </tc:test-case>

  </tc:group>

  <tc:group name="RFC2047 Encoding" anchor="encoding-2047">

    <tc:prose>
      <p>
        These tests RFC 2047 style encoding. 
      </p>
      <p>
        Note that according to <a href="http://greenbytes.de/tech/webdav/rfc2047.html#rfc.section.5">Section 5 of RFC 2047</a>,
        this encoding does not apply here: <q cite="http://greenbytes.de/tech/webdav/rfc2047.html#rfc.section.5">An 'encoded-word' MUST NOT appear within a 'quoted-string'.</q>, and
        <q cite="http://greenbytes.de/tech/webdav/rfc2047.html#rfc.section.5">An 'encoded-word' MUST NOT be used in parameter of a MIME
        Content-Type or Content-Disposition field, or in any structured
        field body except within a 'comment' or 'phrase'.</q>
      </p>
      <p>
        Therefore, these tests are only be present in order to check
        whether the UA by mistake tries to implement RFC 2047.
      </p>
      <p>
        Note that for some bizarre reason, some Web sites, such as GMail, use
        this encoding despite historically it was only implemented in Mozilla
        browsers, which do support the RFC2231 encoding as well.
      </p>
    </tc:prose>

    <tc:test-case code="attrfc2047token" type="parseerror">
      <tc:content-disposition>attachment; filename=<b>=?ISO-8859-1?Q?foo-=E4.html?=</b></tc:content-disposition>
      <tc:description>
        Uses RFC 2047 style encoded word. "=" is invalid inside the <code>token</code>
        production, so this is invalid.
      </tc:description>
      <tc:result for="FF12" outcome="fail">decodes it anyway to "foo-ä.html" (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=601933">Mozilla Bug 601933</a>)</tc:result>
      <tc:result for="FF14" outcome="fail">decodes it anyway to "foo-ä.html" (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=601933">Mozilla Bug 601933</a>)</tc:result>
      <tc:result for="FF15" outcome="fail">decodes it anyway to "foo-ä.html" (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=601933">Mozilla Bug 601933</a>)</tc:result>
      <tc:result for="MSIE8" outcome="warn">takes the whole value as filename, but does not decode it (replacing question marks by underscores)</tc:result>
      <tc:result for="MSIE9" outcome="warn">takes the whole value as filename, but does not decode it (replacing question marks by underscores)</tc:result>
      <tc:result for="Opera" outcome="fail">displays garbage ("=.htm")</tc:result>
      <tc:result for="Safari" outcome="warn">takes the whole value as filename, but does not decode it (replacing question marks by underscores)</tc:result>
      <tc:result for="Konq" outcome="pass">ignores the parameter</tc:result>
      <tc:result for="Chr18" outcome="fail">decodes it anyway to "foo-ä.html" (see <a href="http://code.google.com/p/chromium/issues/detail?id=66694">Chrome Issue 66694</a>)</tc:result>
    </tc:test-case>

    <tc:test-case code="attrfc2047quoted">
      <tc:content-disposition>attachment; filename=<b>"=?ISO-8859-1?Q?foo-=E4.html?="</b></tc:content-disposition>
      <tc:description>
        Uses RFC 2047 style encoded word, using the <code>quoted-string</code> production.
      </tc:description>
      <tc:result for="FF12" outcome="fail">decodes it anyway to "foo-ä.html" (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=601933">Mozilla Bug 601933</a>)</tc:result>
      <tc:result for="FF14" outcome="fail">decodes it anyway to "foo-ä.html" (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=601933">Mozilla Bug 601933</a>)</tc:result>
      <tc:result for="FF15" outcome="fail">decodes it anyway to "foo-ä.html" (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=601933">Mozilla Bug 601933</a>)</tc:result>
      <tc:result for="MSIE8" outcome="pass">takes the whole value as filename, but does not decode it</tc:result>
      <tc:result for="MSIE9" outcome="pass">takes the whole value as filename, but does not decode it</tc:result>
      <tc:result for="Opera" outcome="fail">displays garbage ("=.htm")</tc:result>
      <tc:result for="Safari" outcome="pass">takes the whole value as filename, but does not decode it</tc:result>
      <tc:result for="Konq" outcome="pass">takes the whole value as filename, but does not decode it</tc:result>
      <tc:result for="Chr18" outcome="fail">decodes it anyway to "foo-ä.html" (see <a href="http://code.google.com/p/chromium/issues/detail?id=66694">Chrome Issue 66694</a>)</tc:result>
    </tc:test-case>

  </tc:group>

</tc:test-cases>

