develooper Front page | perl.libwww | Postings from February 2012

Filename in Content-Disposition

Thread Next
From:
Bill Moseley
Date:
February 28, 2012 23:16
Subject:
Filename in Content-Disposition
Message ID:
CAKhN_m6LwgWKe=3AbUt+PKC31_zmXFn+Weg9t55S7AJFGy6Ubw@mail.gmail.com
I have a user-supplied filename that could be anything, including path
segments and fullset of unicode characters (It's decoded as UTF-8 when
supplied by the user.

There seems to be quite a bit of debate about what modern browsers will
except.

my $filename = qq{/some/funny looking/"name that the \\'user' provided'
with a \x{263A} (smile).doc};

How can I pass that back in a Content-Disposition "filename" header escaped
correctly?


-- 
Bill Moseley
moseley@hank.org


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About