Show More
@@ -44,7 +44,7 b' from kallithea.controllers import base' | |||||
44 | from kallithea.lib import diffs, webutils |
|
44 | from kallithea.lib import diffs, webutils | |
45 | from kallithea.lib.auth import HasRepoPermissionLevelDecorator, LoginRequired |
|
45 | from kallithea.lib.auth import HasRepoPermissionLevelDecorator, LoginRequired | |
46 | from kallithea.lib.exceptions import NonRelativePathError |
|
46 | from kallithea.lib.exceptions import NonRelativePathError | |
47 | from kallithea.lib.utils2 import asbool, convert_line_endings, detect_mode, safe_str |
|
47 | from kallithea.lib.utils2 import asbool, convert_line_endings, detect_mode, safe_bytes, safe_str | |
48 | from kallithea.lib.vcs.backends.base import EmptyChangeset |
|
48 | from kallithea.lib.vcs.backends.base import EmptyChangeset | |
49 | from kallithea.lib.vcs.conf import settings |
|
49 | from kallithea.lib.vcs.conf import settings | |
50 | from kallithea.lib.vcs.exceptions import (ChangesetDoesNotExistError, ChangesetError, EmptyRepositoryError, ImproperArchiveTypeError, NodeAlreadyExistsError, |
|
50 | from kallithea.lib.vcs.exceptions import (ChangesetDoesNotExistError, ChangesetError, EmptyRepositoryError, ImproperArchiveTypeError, NodeAlreadyExistsError, | |
@@ -233,7 +233,7 b' class FilesController(base.BaseRepoContr' | |||||
233 | file_node = self.__get_filenode(cs, f_path) |
|
233 | file_node = self.__get_filenode(cs, f_path) | |
234 |
|
234 | |||
235 | response.content_disposition = \ |
|
235 | response.content_disposition = \ | |
236 | 'attachment; filename=%s' % f_path.split(kallithea.URL_SEP)[-1] |
|
236 | 'attachment; filename=%s' % safe_bytes(f_path.split(kallithea.URL_SEP)[-1]).decode('latin1') | |
237 |
|
237 | |||
238 | response.content_type = file_node.mimetype |
|
238 | response.content_type = file_node.mimetype | |
239 | return file_node.content |
|
239 | return file_node.content |
General Comments 0
You need to be logged in to leave comments.
Login now