mime_type, encoding = mimetypes.guess_type(name)
response = StreamingHttpResponse(data, content_type=mime_type or 'application/octet-stream')
- response['Content-Disposition'] = u'attachment; filename={}'.format(name)
+ response['Content-Disposition'] = 'attachment; filename*={}'.format(urlquote(name))
response['Content-Length'] = stats['size']
if encoding: