W3C home > Mailing lists > Public > public-html@w3.org > March 2008

Re: UA support for Content-Disposition header (filename parameter)

From: Michael A. Puls II <shadow2531@gmail.com>
Date: Fri, 14 Mar 2008 12:26:13 -0400
Message-ID: <6b9c91b20803140926u2ae045a2idc1a721f12ed5dfe@mail.gmail.com>
To: "Julian Reschke" <julian.reschke@gmx.de>
Cc: "public-html@w3.org" <public-html@w3.org>

On 3/14/08, Julian Reschke <julian.reschke@gmx.de> wrote:
>
>  Here's a problem that plagued me a few years ago, and I'm pretty sure
>  the situation hasn't improved since then, at least not in IE. Maybe
>  HTML5 should say something about it.
>
>  Use case: have the UA offer a "save as" dialogue, including the filename.
>
>  Mechanism: Content-Disposition HTTP header, as defined in RFC2616
>  (<http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.19.5.1>)
>
>  Example:
>
>    Content-Disposition: attachment; filename=fname.ext
>
>  Problem: this works fine in all browsers, as long as the filename does
>  not contain non-Latin1 characters.
>
>  RFC 2231 (<http://greenbytes.de/tech/webdav/rfc2231.html>) defines an
>  escaping, and that is supported by Firefox. Example:
>
>    Content-Disposition: attachment; filename*=utf8''D%C3%BCrst.ext
>
>  IE does not support RFC 2231 (as of IE7), but allows percent escaped
>  UTF-8, such as in:
>
>    Content-Disposition: attachment; filename=D%C3%BCrst.ext
>
>  However, that only works when IE is configured for UTF-8 URL encoding,
>  which is (as far as I recall) not the default in countries using Asian
>  languages.
>
>  Proposal: require UAs to support RFC 2231 (UTF-8 variant).

Reminds me of this thread: <
http://my.opera.com/community/forums/topic.dml?id=118971 >

The solution at the end was to detect IE via the user agent header, do
IE's way for the filename and do the RFC 2231 way for others. But,
that's assumes UTF-8 URL encoding is turned on in IE.

It'd be nice if IE supported the RFC 2231 way.

-- 
Michael
Received on Friday, 14 March 2008 16:26:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:13 GMT