[Catalyst] Content-Disposition filename

Bill Moseley moseley at hank.org
Thu Dec 2 23:31:00 GMT 2010


What's the current thought on the filename value?

RFC2183 says the values should be 78 chars and limited to ASCII.  2184 and
then 2231 discuss encoding but not clear how well supported.
See http://greenbytes.de/tech/tc2231/ for various tests on browsers.

Should I limit to 78 "characters" and then percent-encode the encoded utf8
string?

uri_escape( encode( 'UTF-8', substr($name, 0, 78) ) );

Or encode to US-ASCII and let encode replace non ASCII with "?"?  That seems
ugly.



Too bad HTTP::Headers doesn't abstract all this out.



-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20101202/0f775=
af9/attachment.htm


More information about the Catalyst mailing list