commit/galaxy-central: natefoo: Set a catchall content-type (application/octet-stream) on metadata file downloads so Safari doesn't consider them to be html.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/8d5850e45538/ changeset: 8d5850e45538 branches: user: natefoo date: 2011-06-01 22:27:28 summary: Set a catchall content-type (application/octet-stream) on metadata file downloads so Safari doesn't consider them to be html. affected #: 1 file (76 bytes) --- a/lib/galaxy/web/controllers/dataset.py Wed Jun 01 16:21:12 2011 -0400 +++ b/lib/galaxy/web/controllers/dataset.py Wed Jun 01 16:27:28 2011 -0400 @@ -316,6 +316,7 @@ valid_chars = '.,^_-()[]0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' fname = ''.join(c in valid_chars and c or '_' for c in data.name)[0:150] + trans.response.headers["Content-Type"] = "application/octet-stream" trans.response.headers["Content-Disposition"] = "attachment; filename=Galaxy%s-[%s].%s" % (data.hid, fname, metadata_type) return open(data.metadata.get(metadata_type).file_name) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket