Please send feedback to julian.reschke@gmx.de.
Unless stated otherwise, all tests were executed with the latest release versions of Firefox 3.6, Google Chrome, Microsoft Internet Explorer 8, Safari 5 and Opera 10.6 on a machine running Windows 7. For Konqueror, version 4.4 was tested on OpenSuse 10.3.
| Test Case | Firefox 3.6.* | Microsoft IE 8 | Opera 10.6 | Safari 5.0.* | Konqueror 4.4.4 | Google Chrome 6.0.* | |
|---|---|---|---|---|---|---|---|
| Summary | |||||||
| Content-Disposition: Disposition-Type Inline | inlonly | pass | pass | pass | pass | pass | pass |
| inlwithasciifilename | pass (uses the filename in subsequent 'save' operation) | pass (filename information not used) | pass (filename information not used) | pass (filename information not used) | pass (filename information not used) | pass (filename information not used) | |
| inlwithasciifilenamepdf | pass (filename information not used (see Mozilla Bug 433613)) | pass (filename information not used) | pass (uses the filename in subsequent 'save' operation (when done through the UA's menu)) | pass (uses the filename in subsequent 'save' operation (when done through the UA's menu)) | pass (filename information not used) | pass (uses the filename in subsequent 'save' operation) | |
| Content-Disposition: Disposition-Type Attachment | attonly | pass | pass | pass | pass | pass | pass |
| attonly403 | pass (but displays a misleading error message (see Mozilla Bug 364354)) | pass (but displays a misleading error message) | fail (saves the content without warning) | fail (saves the content without warning) | warn (displays the content as if the header field wasn't present) | pass (but displays a misleading error message) | |
| attonlyucase | pass | pass | pass | pass | pass | pass | |
| attwithasciifilename | pass | pass | pass | pass | pass | pass | |
| attwithasciifnescapedchar | fail (apparently does not treat the backslash as escape character, replaces it with '_' (see Mozilla Bug 588389)) | fail (apparently does not treat the backslash as escape character, replaces it with '_') | pass | fail (apparently does not treat the backslash as escape character, replaces it with '-') | pass | fail (saves "oo.html" (what's going on here?, see Chrome Issue 52577)) | |
| attwithasciifnescapedquote | fail (apparently does not treat the backslash as escape character, replaces it with '_' (see Mozilla Bug 588389)) | fail (apparently does not treat the backslash as escape character, replaces it with '_') | pass | fail (apparently does not treat the backslash as escape character, replaces it with '-') | pass | fail (fails to decode the filename completely, apparently parser being very confused (this may be the same bug as Chrome Issue 52577)) | |
| attwithfilenameandextparam | pass | pass | pass | pass | pass | pass | |
| attwithasciifilenameucase | pass | pass | pass | pass | pass | pass | |
| attwithasciifilenamenq | pass (accepts the unquoted value) | pass (accepts the unquoted value) | pass (accepts the unquoted value) | pass (accepts the unquoted value) | pass (accepts the unquoted value) | pass (accepts the unquoted value) | |
| attwithisofnplain | pass | pass | pass | pass | pass | pass | |
| attwithutf8fnplain | fail (decodes as UTF-8 (see Mozilla Bug 588409)) | pass | pass | fail (decodes as UTF-8) | pass | fail (decodes as UTF-8) | |
| attwithfnrawpctenca | pass | fail (displays "foo-A.html") | pass | pass | pass | fail (displays "foo-A.html" (see Chrome Issue 118)) | |
| attwithfnrawpctenclong | pass | fail (displays "foo-ä-€.html") | pass | pass | pass | fail (displays "foo-ä-€.html" (see Chrome Issue 118)) | |
| attwithasciifilenamews1 | pass | pass | pass | pass | pass | pass | |
| attwithasciifilenamews2 | pass | pass | pass | pass | pass | fail (detects "-foo.html") | |
| attfnbrokentoken | warn (accepts the unquoted value) | warn (accepts the unquoted value) | warn (accepts the unquoted value) | warn (accepts the unquoted value) | pass | warn (accepts the unquoted value) | |
| Content-Disposition: Additional Parameters | attcdate | unsupported (seems to ignore the parameter (see Mozilla Bug 531353)) | unsupported (seems to ignore the parameter) | unsupported (seems to ignore the parameter) | unsupported (seems to ignore the parameter) | unsupported (seems to ignore the parameter) | unsupported (seems to ignore the parameter) |
| attmdate | unsupported (seems to ignore the parameter (see Mozilla Bug 531353)) | unsupported (seems to ignore the parameter) | unsupported (seems to ignore the parameter) | unsupported (seems to ignore the parameter) | unsupported (seems to ignore the parameter) | unsupported (seems to ignore the parameter) | |
| Content-Disposition: Disposition-Type Extension | dispext | pass | fail (does not treat it as 'attachment') | fail (does not treat it as 'attachment') | fail (does not treat it as 'attachment') | pass | pass |
| RFC2231 Encoding: Character Sets | attwithisofn2231iso | pass | unsupported | pass | unsupported | pass | unsupported |
| attwithfn2231utf8 | pass | unsupported | pass | unsupported | pass | unsupported | |
| attwithfn2231noc | warn (decodes as UTF-8) | unsupported | warn (decodes as 8bit encoding (ISO-8859-1?)) | unsupported | pass (ignores the parameter) | unsupported | |
| attwithfn2231utf8comp | pass | unsupported | pass | unsupported | pass | unsupported | |
| attwithfn2231utf8-bad | fail (falls back to UTF-8) | unsupported | warn (displays the raw octet sequence as if it was ISO-8859-1 (which is internally treated as windows-1252, which does allow %82)) | unsupported | warn (displays the raw octet sequence as if it was ISO-8859-1) | unsupported | |
| attwithfn2231ws1 | fail (displays garbage) | unsupported | pass | unsupported | pass | unsupported | |
| attwithfn2231ws2 | pass | unsupported | pass | unsupported | pass | unsupported | |
| attwithfn2231ws3 | pass | unsupported | pass | unsupported | pass | unsupported | |
| attwithfn2231quot | fail (tries to be helpful by removing the quotes) | unsupported | pass | unsupported | pass | unsupported | |
| attwithfn2231encmissing | fail (sniffs the encoding as UTF-8) | unsupported | fail (assumes a default of ISO-8859-1) | unsupported | pass | unsupported | |
| RFC2231 Encoding: Continuations | attfncont | pass | unsupported | pass | unsupported | pass | unsupported |
| attfncontenc | pass | unsupported | pass | unsupported | pass | unsupported | |
| attfncontlz | warn (accepts leading zeros) | unsupported | warn (accepts leading zeros) | unsupported | pass | unsupported | |
| attfncontnc | warn (accepts gaps) | unsupported | pass | unsupported | pass | unsupported | |
| attfnconts1 | pass | unsupported | pass | unsupported | pass | unsupported | |
| attfncontord | fail (parameters apparently are expected to be ordered (see Mozilla Bug 588414)) | unsupported | pass | unsupported | pass | unsupported | |
| RFC2231 Encoding: Fallback Behaviour | attfnboth | warn (picks the traditionally encoded value -- the first of both (see Mozilla Bug 588781)) | unsupported (picks the traditionally encoded value -- the first of both) | warn (picks the traditionally encoded value -- the first of both) | unsupported (picks the traditionally encoded value -- the first of both) | pass (picks the RFC 2231 encoded one) | unsupported (picks the traditionally encoded value -- the first of both) |
| attfnboth2 | pass (picks the RFC2231 encoded value -- the first of both) | fail (ignores the parameter (this indicates a parsing bug)) | pass (picks the RFC2231 encoded value -- the first of both) | unsupported (picks the traditionally encoded value -- the one it understands) | pass (picks the RFC 2231 encoded one) | fail (ignores the parameter (this indicates a parsing bug, see Chrome Bug 36903)) | |
| RFC2047 Encoding | attrfc2047token | fail (decodes it anyway to "foo-ä.html") | warn (takes the whole value as filename, but does not decode it (replacing question marks by underscores)) | fail (displays garbage ("=.htm")) | warn (takes the whole value as filename, but does not decode it (replacing question marks by underscores)) | pass (ignores the parameter) | fail (decodes it anyway to "foo-ä.html") |
| attrfc2047quoted | fail (decodes it anyway to "foo-ä.html") | pass (takes the whole value as filename, but does not decode it) | fail (displays garbage ("=.htm")) | pass (takes the whole value as filename, but does not decode it) | pass (takes the whole value as filename, but does not decode it) | fail (decodes it anyway to "foo-ä.html") | |
Various tests relating to the "inline" disposition type, see Section 2.1 of RFC 2183.
Content-Disposition: inline
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | pass |
| Opera | pass |
| Safari | pass |
| Konq | pass |
| Chrome | pass |
'inline' only
This should be equivalent to not including the header at all.
Content-Disposition: inline; filename="foo.html"
| Test Results | |
|---|---|
| FF3 | pass (uses the filename in subsequent 'save' operation) |
| MSIE8 | pass (filename information not used) |
| Opera | pass (filename information not used) |
| Safari | pass (filename information not used) |
| Konq | pass (filename information not used) |
| Chrome | pass (filename information not used) |
'inline', specifying a filename of foo.html
Some UAs use this filename in a subsequent "save" operation.
Content-Disposition: inline; filename="foo.pdf"
| Test Results | |
|---|---|
| FF3 | pass (filename information not used (see Mozilla Bug 433613)) |
| MSIE8 | pass (filename information not used) |
| Opera | pass (uses the filename in subsequent 'save' operation (when done through the UA's menu)) |
| Safari | pass (uses the filename in subsequent 'save' operation (when done through the UA's menu)) |
| Konq | pass (filename information not used) |
| Chrome | pass (uses the filename in subsequent 'save' operation) |
'inline', specifying a filename of foo.pdf
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).
Various tests relating to the "attchment" disposition type, see Section 2.2 of RFC 2183.
Content-Disposition: attachment
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | pass |
| Opera | pass |
| Safari | pass |
| Konq | pass |
| Chrome | pass |
'attachment' only
UA should offer to download the resource.
Content-Disposition: attachment
| Test Results | |
|---|---|
| FF3 | pass (but displays a misleading error message (see Mozilla Bug 364354)) |
| MSIE8 | pass (but displays a misleading error message) |
| Opera | fail (saves the content without warning) |
| Safari | fail (saves the content without warning) |
| Chrome | pass (but displays a misleading error message) |
| Konq | warn (displays the content as if the header field wasn't present) |
'attachment' only, but returned with a 403 status.
UA should report the server status.
Content-Disposition: ATTACHMENT
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | pass |
| Opera | pass |
| Safari | pass |
| Konq | pass |
| Chrome | pass |
'ATTACHMENT' only
UA should offer to download the resource.
Content-Disposition: attachment; filename="foo.html"
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | pass |
| Opera | pass |
| Safari | pass |
| Konq | pass |
| Chrome | pass |
'attachment', specifying a filename of foo.html
UA should offer to download the resource as "foo.html".
Content-Disposition: attachment; filename="f\oo.html"
| Test Results | |
|---|---|
| FF3 | fail (apparently does not treat the backslash as escape character, replaces it with '_' (see Mozilla Bug 588389)) |
| MSIE8 | fail (apparently does not treat the backslash as escape character, replaces it with '_') |
| Opera | pass |
| Safari | fail (apparently does not treat the backslash as escape character, replaces it with '-') |
| Konq | pass |
| Chrome | fail (saves "oo.html" (what's going on here?, see Chrome Issue 52577)) |
'attachment', specifying a filename of f\oo.html (the first 'o' being escaped)
UA should offer to download the resource as "foo.html".
Content-Disposition: attachment; filename="\"quoting\" tested.html"
| Test Results | |
|---|---|
| FF3 | fail (apparently does not treat the backslash as escape character, replaces it with '_' (see Mozilla Bug 588389)) |
| MSIE8 | fail (apparently does not treat the backslash as escape character, replaces it with '_') |
| Opera | pass |
| Safari | fail (apparently does not treat the backslash as escape character, replaces it with '-') |
| Konq | pass |
| Chrome | fail (fails to decode the filename completely, apparently parser being very confused (this may be the same bug as Chrome Issue 52577)) |
'attachment', specifying a filename of \"quoting\" tested.html (using double quotes around "quoting" to test... quoting)
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.
Content-Disposition: attachment; foo="bar"; filename="foo.html"
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | pass |
| Opera | pass |
| Safari | pass |
| Konq | pass |
| Chrome | pass |
'attachment', specifying a filename of foo.html
and an extension parameter "foo" which should be ignored
(see Section 2.8 of RFC 2183.).
UA should offer to download the resource as "foo.html".
Content-Disposition: attachment; FILENAME="foo.html"
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | pass |
| Opera | pass |
| Safari | pass |
| Konq | pass |
| Chrome | pass |
'attachment', specifying a filename of foo.html
UA should offer to download the resource as "foo.html".
Content-Disposition: attachment; filename=foo.html
| Test Results | |
|---|---|
| FF3 | pass (accepts the unquoted value) |
| MSIE8 | pass (accepts the unquoted value) |
| Opera | pass (accepts the unquoted value) |
| Safari | pass (accepts the unquoted value) |
| Konq | pass (accepts the unquoted value) |
| Chrome | pass (accepts the unquoted value) |
'attachment', specifying a filename of foo.html using a token
instead of a quoted-string.
This is invalid according to Section 19.5.1 of RFC2616, but probably can be considered a specification bug. It is legal according to RFC 2183 and will be in draft-reschke-rfc2183-in-http.
Content-Disposition: attachment; filename="foo-ä.html"
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | pass |
| Opera | pass |
| Safari | pass |
| Konq | pass |
| Chrome | pass |
'attachment', specifying a filename of foo-ä.html, using plain ISO-8859-1
UA should offer to download the resource as "foo-ä.html".
Content-Disposition: attachment; filename="foo-ä.html"
| Test Results | |
|---|---|
| FF3 | fail (decodes as UTF-8 (see Mozilla Bug 588409)) |
| MSIE8 | pass |
| Opera | pass |
| Safari | fail (decodes as UTF-8) |
| Konq | pass |
| Chrome | fail (decodes as UTF-8) |
'attachment', specifying a filename of foo-ä.html,
which happens to be foo-ä.html using UTF-8 encoding.
UA should offer to download the resource as "foo-ä.html". Displaying "foo-ä.html" instead indicates that the UA tried to be smart by detecting something that happens to look like UTF-8.
Content-Disposition: attachment; filename="foo-%41.html"
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | fail (displays "foo-A.html") |
| Opera | pass |
| Safari | pass |
| Konq | pass |
| Chrome | fail (displays "foo-A.html" (see Chrome Issue 118)) |
'attachment', specifying a filename of foo-%41.html
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.
Content-Disposition: attachment; filename="foo-%c3%a4-%e2%82%ac.html"
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | fail (displays "foo-ä-€.html") |
| Opera | pass |
| Safari | pass |
| Konq | pass |
| Chrome | fail (displays "foo-ä-€.html" (see Chrome Issue 118)) |
'attachment', specifying a filename of foo-%c3%a4-%e2%82%ac.html, using raw percent encoded UTF-8
to represent foo-ä-€.html
UA should offer to download the resource as "foo-%c3%a4-%e2%82%ac.html". Displaying "foo-ä-€.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.
Content-Disposition: attachment; filename ="foo.html"
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | pass |
| Opera | pass |
| Safari | pass |
| Konq | pass |
| Chrome | pass |
'attachment', specifying a filename of foo.html, with one
blank space before the equals character.
UA should offer to download the resource as "foo.html".
Content-Disposition: attachment; filename= "foo.html"
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | pass |
| Opera | pass |
| Safari | pass |
| Konq | pass |
| Chrome | fail (detects "-foo.html") |
'attachment', specifying a filename of foo.html, with one
blank space after the equals character.
UA should offer to download the resource as "foo.html".
Content-Disposition: attachment; filename=foo[1](2).html
| Test Results | |
|---|---|
| FF3 | warn (accepts the unquoted value) |
| MSIE8 | warn (accepts the unquoted value) |
| Opera | warn (accepts the unquoted value) |
| Safari | warn (accepts the unquoted value) |
| Konq | pass |
| Chrome | warn (accepts the unquoted value) |
'attachment', specifying a filename of foo[1](2).html, but missing
the quotes. Also, "[", "]", "(" and ")" are not allowed in the HTTP token
production.
This is invalid according to Section 19.5.1 of RFC2616, so UAs should ignore it.
Various tests relating to the additional parameters defined in Section 2 of RFC 2183.
Content-Disposition: attachment; creation-date="Wed, 12 Feb 1997 16:29:51 -0500"
| Test Results | |
|---|---|
| FF3 | unsupported (seems to ignore the parameter (see Mozilla Bug 531353)) |
| MSIE8 | unsupported (seems to ignore the parameter) |
| Opera | unsupported (seems to ignore the parameter) |
| Safari | unsupported (seems to ignore the parameter) |
| Konq | unsupported (seems to ignore the parameter) |
| Chrome | unsupported (seems to ignore the parameter) |
'attachment', plus creation-date (see Section 2.4 of RFC 2183)
UA should offer to download the resource. When doing so, the creation date should be set to 12 Feb 1997.
Content-Disposition: attachment; modification-date="Wed, 12 Feb 1997 16:29:51 -0500"
| Test Results | |
|---|---|
| FF3 | unsupported (seems to ignore the parameter (see Mozilla Bug 531353)) |
| MSIE8 | unsupported (seems to ignore the parameter) |
| Opera | unsupported (seems to ignore the parameter) |
| Safari | unsupported (seems to ignore the parameter) |
| Konq | unsupported (seems to ignore the parameter) |
| Chrome | unsupported (seems to ignore the parameter) |
'attachment', plus modification-date (see Section 2.5 of RFC 2183)
UA should offer to download the resource. When doing so, the modification date should be set to 12 Feb 1997.
A test checking behavior for disposition type extensions, which should be treated as "attachment", see Section 2.8 of RFC 2183.
Various tests using the parameter value encoding defined in Section 4 of RFC 2231.
Content-Disposition: attachment; filename*=iso-8859-1''foo-%E4.html
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | unsupported |
| Opera | pass |
| Safari | unsupported |
| Konq | pass |
| Chrome | unsupported |
'attachment', specifying a filename of foo-ä.html, using RFC2231 encoded ISO-8859-1
UA should offer to download the resource as "foo-ä.html".
Content-Disposition: attachment; filename*=UTF-8''foo-%c3%a4-%e2%82%ac.html
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | unsupported |
| Opera | pass |
| Safari | unsupported |
| Konq | pass |
| Chrome | unsupported |
'attachment', specifying a filename of foo-ä-€.html, using RFC2231 encoded UTF-8
UA should offer to download the resource as "foo-ä-€.html".
Content-Disposition: attachment; filename*=''foo-%c3%a4-%e2%82%ac.html
| Test Results | |
|---|---|
| FF3 | warn (decodes as UTF-8) |
| MSIE8 | unsupported |
| Opera | warn (decodes as 8bit encoding (ISO-8859-1?)) |
| Safari | unsupported |
| Konq | pass (ignores the parameter) |
| Chrome | unsupported |
Behavior is undefined in RFC 2231, the charset part is missing, although UTF-8 was used.
Content-Disposition: attachment; filename*=UTF-8''foo-a%cc%88.html
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | unsupported |
| Opera | pass |
| Safari | unsupported |
| Konq | pass |
| Chrome | unsupported |
'attachment', specifying a filename of foo-ä.html, 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).
UA should offer to download the resource as "foo-ä.html".
Content-Disposition: attachment; filename*=iso-8859-1''foo-%c3%a4-%e2%82%ac.html
| Test Results | |
|---|---|
| FF3 | fail (falls back to UTF-8) |
| MSIE8 | unsupported |
| Opera | warn (displays the raw octet sequence as if it was ISO-8859-1 (which is internally treated as windows-1252, which does allow %82)) |
| Safari | unsupported |
| Konq | warn (displays the raw octet sequence as if it was ISO-8859-1) |
| Chrome | unsupported |
'attachment', specifying a filename of foo-ä-€.html, using RFC2231 encoded UTF-8, but declaring ISO-8859-1
The octet %82 does not represent a valid ISO-8859-1 code point, so the UA should really ignore the parameter.
Content-Disposition: attachment; filename *=UTF-8''foo-%c3%a4.html
| Test Results | |
|---|---|
| FF3 | fail (displays garbage) |
| MSIE8 | unsupported |
| Opera | pass |
| Safari | unsupported |
| Konq | pass |
| Chrome | unsupported |
'attachment', specifying a filename of foo-ä.html, using RFC2231 encoded UTF-8, with whitespace before "*="
The parameter is invalid, thus should be ignored.
Content-Disposition: attachment; filename*= UTF-8''foo-%c3%a4.html
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | unsupported |
| Opera | pass |
| Safari | unsupported |
| Konq | pass |
| Chrome | unsupported |
'attachment', specifying a filename of foo-ä.html, using RFC2231 encoded UTF-8, with whitespace after "*="
UA should offer to download the resource as "foo-ä.html".
Content-Disposition: attachment; filename* =UTF-8''foo-%c3%a4.html
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | unsupported |
| Opera | pass |
| Safari | unsupported |
| Konq | pass |
| Chrome | unsupported |
'attachment', specifying a filename of foo-ä.html, using RFC2231 encoded UTF-8, with whitespace inside "* ="
UA should offer to download the resource as "foo-ä.html".
Content-Disposition: attachment; filename*="UTF-8''foo-%c3%a4.html"
| Test Results | |
|---|---|
| FF3 | fail (tries to be helpful by removing the quotes) |
| MSIE8 | unsupported |
| Opera | pass |
| Safari | unsupported |
| Konq | pass |
| Chrome | unsupported |
'attachment', specifying a filename of foo-ä.html, using RFC2231 encoded UTF-8, with double quotes
around the parameter value.
The parameter is invalid, thus should be ignored.
Content-Disposition: attachment; filename*=''foo-%c3%a4.html
| Test Results | |
|---|---|
| FF3 | fail (sniffs the encoding as UTF-8) |
| MSIE8 | unsupported |
| Opera | fail (assumes a default of ISO-8859-1) |
| Safari | unsupported |
| Konq | pass |
| Chrome | unsupported |
'attachment', specifying a filename of foo-ä.html, using RFC2231 encoded UTF-8, but
leaving out the charset field.
The parameter is invalid, thus should be ignored.
Various tests using the parameter value continuation efined in Section 3 of RFC 2231.
Content-Disposition: attachment; filename*0="foo."; filename*1="html"
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | unsupported |
| Opera | pass |
| Safari | unsupported |
| Konq | pass |
| Chrome | unsupported |
'attachment', specifying a filename of foo.html, using RFC2231-style parameter continuations.
UA should offer to download the resource as "foo.html".
Content-Disposition: attachment; filename*0*=UTF-8''foo-%c3%a4; filename*1=".html"
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | unsupported |
| Opera | pass |
| Safari | unsupported |
| Konq | pass |
| Chrome | unsupported |
'attachment', specifying a filename of foo-ä.html, using both RFC2231-style parameter continuations
and UTF-8 encoding.
UA should offer to download the resource as "foo-ä.html".
Content-Disposition: attachment; filename*0="foo"; filename*01="bar"
| Test Results | |
|---|---|
| FF3 | warn (accepts leading zeros) |
| MSIE8 | unsupported |
| Opera | warn (accepts leading zeros) |
| Safari | unsupported |
| Konq | pass |
| Chrome | unsupported |
'attachment', specifying a filename of foo (the parameter filename*01 should be ignored because of the leading zero)
UA should offer to download the resource as "foo".
Content-Disposition: attachment; filename*0="foo"; filename*2="bar"
| Test Results | |
|---|---|
| FF3 | warn (accepts gaps) |
| MSIE8 | unsupported |
| Opera | pass |
| Safari | unsupported |
| Konq | pass |
| Chrome | unsupported |
'attachment', specifying a filename of foo (the parameter filename*2 because there's no filename*1 parameter)
UA should offer to download the resource as "foo".
Content-Disposition: attachment; filename*1="foo."; filename*2="html"
| Test Results | |
|---|---|
| FF3 | pass |
| MSIE8 | unsupported |
| Opera | pass |
| Safari | unsupported |
| Konq | pass |
| Chrome | unsupported |
'attachment' (the filename* parameters should be ignored because filename*0 is missing)
UA should offer to download, not getting the filename from the header.
Content-Disposition: attachment; filename*1="bar"; filename*0="foo"
| Test Results | |
|---|---|
| FF3 | fail (parameters apparently are expected to be ordered (see Mozilla Bug 588414)) |
| MSIE8 | unsupported |
| Opera | pass |
| Safari | unsupported |
| Konq | pass |
| Chrome | unsupported |
'attachment', specifying a filename of foobar
UA should offer to download the resource as "foobar".
This tests how the UA behaves when the same parameter name appear both in traditional and RFC 2231 extended format.
Content-Disposition: attachment; filename="foo-ae.html"; filename*=UTF-8''foo-%c3%a4.html
| Test Results | |
|---|---|
| FF3 | warn (picks the traditionally encoded value -- the first of both (see Mozilla Bug 588781)) |
| MSIE8 | unsupported (picks the traditionally encoded value -- the first of both) |
| Opera | warn (picks the traditionally encoded value -- the first of both) |
| Safari | unsupported (picks the traditionally encoded value -- the first of both) |
| Konq | pass (picks the RFC 2231 encoded one) |
| Chrome | unsupported (picks the traditionally encoded value -- the first of both) |
'attachment', specifying a filename of foo-ae.html in
the traditional format, and foo-ä.html in RFC2231 format.
Section 4.2 of RFC 5987 suggests that the RFC 2231/5987 encoded parameter ("filename*") should take precedence when understood.
Content-Disposition: attachment; filename*=UTF-8''foo-%c3%a4.html; filename="foo-ae.html"
| Test Results | |
|---|---|
| FF3 | pass (picks the RFC2231 encoded value -- the first of both) |
| MSIE8 | fail (ignores the parameter (this indicates a parsing bug)) |
| Opera | pass (picks the RFC2231 encoded value -- the first of both) |
| Safari | unsupported (picks the traditionally encoded value -- the one it understands) |
| Konq | pass (picks the RFC 2231 encoded one) |
| Chrome | fail (ignores the parameter (this indicates a parsing bug, see Chrome Bug 36903)) |
'attachment', specifying a filename of foo-ae.html in
the traditional format, and foo-ä.html in RFC2231 format.
Section 4.2 of RFC 5987 suggests that the RFC 2231/5987 encoded parameter ("filename*") should take precedence when understood.
These tests RFC 2047 style encoding.
Note that according to Section 5 of RFC 2047,
this encoding does not apply here: An 'encoded-word' MUST NOT appear within a 'quoted-string'.
, and
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'.
Therefore, these tests are only be present in order to check whether the UA by mistake tries to implement RFC 2047.
Content-Disposition: attachment; filename==?ISO-8859-1?Q?foo-=E4.html?=
| Test Results | |
|---|---|
| FF3 | fail (decodes it anyway to "foo-ä.html") |
| MSIE8 | warn (takes the whole value as filename, but does not decode it (replacing question marks by underscores)) |
| Opera | fail (displays garbage ("=.htm")) |
| Safari | warn (takes the whole value as filename, but does not decode it (replacing question marks by underscores)) |
| Konq | pass (ignores the parameter) |
| Chrome | fail (decodes it anyway to "foo-ä.html") |
Uses RFC 2047 style encoded word. "=" is invalid inside the token
production, so this is invalid.
Content-Disposition: attachment; filename="=?ISO-8859-1?Q?foo-=E4.html?="
| Test Results | |
|---|---|
| FF3 | fail (decodes it anyway to "foo-ä.html") |
| MSIE8 | pass (takes the whole value as filename, but does not decode it) |
| Opera | fail (displays garbage ("=.htm")) |
| Safari | pass (takes the whole value as filename, but does not decode it) |
| Konq | pass (takes the whole value as filename, but does not decode it) |
| Chrome | fail (decodes it anyway to "foo-ä.html") |
Uses RFC 2047 style encoded word, using the quoted-string production.
Both this document and the indiviual test "scripts" are generated from one single XML source (tc2231.xml), using an XSLT2 transformation (tc2231.xslt).
To generate the files, an XSLT2 processor such as Saxon 9 is needed. Copy both files into an empty directory, then run:
saxon9 tc2231.xml tc2231.xslt > index.html
Note that this will also generate a set of "asis" files that contain the actual test cases. These can be served using the Apache httpd mod_asis module.