Skip to content

[ENG-8472] Files with Cyrillic in their names won't render #392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: feature/buff-worms
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mfr/server/handlers/export.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import asyncio
import logging
import os
from urllib.parse import quote

from waterbutler.core.exceptions import InvalidParameters, DownloadError
import waterbutler.core.streams
Expand Down Expand Up @@ -118,6 +119,6 @@ async def _cache_and_clean(self):
pass

def _set_headers(self):
self.set_header('Content-Disposition', 'attachment;filename="{}"'.format('{}.{}'.format(self.metadata.name.replace('"', '\\"'), self.format)))
self.set_header('Content-Disposition', f'attachment;filename*=UTF-8\'\'{quote(self.metadata.name.replace('"', '\\"'))}.{self.format}')
if self.metadata.content_type:
self.set_header('Content-Type', self.metadata.content_type)