I have a problem with HTTP headers, they are encoded in ASCII, and I want to provide a view for downloading files whose names may not be ASCII.
response['Content-Disposition'] = 'attachment; filename="%s"' % (vo.filename.encode("ASCII","replace"), )
I do not want to use static files for the same problem with non-ASCII file names, but in this case there will be a problem with the file system and file name encoding. (I do not know the purpose.)
I already tried urllib.quote (), but throws a KeyError exception.
Maybe I'm doing something wrong, but maybe this is not possible.
Chris Ciesielski Sep 01 '09 at 10:00 2009-09-01 10:00
source share