allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jetm...@apache.org
Subject [02/29] allura git commit: [#7899] ticket:808 Fixed downloading repo files with spaces
Date Mon, 13 Jul 2015 10:44:06 GMT
[#7899] ticket:808 Fixed downloading repo files with spaces


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/fdefe42f
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/fdefe42f
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/fdefe42f

Branch: refs/heads/ib/7685
Commit: fdefe42fb654ca105d05c302a351edf0a49f9d4d
Parents: 6991e51
Author: Aleksey 'LXj' Alekseyev <gotletter@gmail.com>
Authored: Sun Jun 28 13:18:02 2015 +0300
Committer: Igor Bondarenko <jetmind2@gmail.com>
Committed: Mon Jul 6 15:12:34 2015 +0300

----------------------------------------------------------------------
 Allura/allura/controllers/repository.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/fdefe42f/Allura/allura/controllers/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index 4c9cb83..e9f051d 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -738,7 +738,8 @@ class FileBrowser(BaseController):
             response.headers['Content-Encoding'] = ''
             response.content_encoding = content_encoding
         response.headers.add(
-            'Content-Disposition', 'attachment;filename=' + filename)
+            'Content-Disposition',
+            'attachment;filename="%s"' % filename.encode('utf-8'))
         return iter(self._blob)
 
     def diff(self, commit, fmt=None, **kw):


Mime
View raw message