response['Content-Disposition'] = 'attachment; filename=%s' % filename
In this Django response, the header causes the intended download but commas in the filename makes Chromium throw a low-level error and spaces cause the filename to change on download. How do I encode filename so the downloaded file gets the same filename?
Converting filename to slug seems to solve the issue, but I want to download with the original filename.