Fix two more places where filenames in content-dispositions were not being surrounded by quotes.

This commit is contained in:
Daniel Blankenberg
2012-04-12 14:14:45 -04:00
parent fb600d644a
commit c3f962b932
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -250,7 +250,7 @@ class RootController( BaseUIController, UsesHistory, UsesAnnotations ):
valid_chars = '.,^_-()[]0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
fname = data.name
fname = ''.join(c in valid_chars and c or '_' for c in fname)[0:150]
trans.response.headers["Content-Disposition"] = "attachment; filename=GalaxyHistoryItem-%s-[%s]%s" % (data.hid, fname, toext)
trans.response.headers["Content-Disposition"] = 'attachment; filename="GalaxyHistoryItem-%s-[%s]%s"' % (data.hid, fname, toext)
trans.log_event( "Display dataset id: %s" % str(id) )
try:
return open( data.file_name )
+1 -1
View File
@@ -1109,7 +1109,7 @@ class WorkflowController( BaseUIController, Sharable, UsesStoredWorkflow, UsesAn
valid_chars = '.,^_-()[]0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
sname = stored.name
sname = ''.join(c in valid_chars and c or '_' for c in sname)[0:150]
trans.response.headers["Content-Disposition"] = "attachment; filename=Galaxy-Workflow-%s.ga" % ( sname )
trans.response.headers["Content-Disposition"] = 'attachment; filename="Galaxy-Workflow-%s.ga"' % ( sname )
trans.response.set_content_type( 'application/galaxy-archive' )
return stored_dict
@web.expose