Skip to content

Commit

Permalink
Give raw downloads a better filename
Browse files Browse the repository at this point in the history
  • Loading branch information
ConradIrwin authored and bhb committed Jul 25, 2011
1 parent 95db82e commit 89ac2bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rack/perftools_profiler/profiler_middleware.rb
Expand Up @@ -61,7 +61,7 @@ def headers(printer, body)
'Content-Type' => PRINTER_CONTENT_TYPE[printer], 'Content-Type' => PRINTER_CONTENT_TYPE[printer],
'Content-Length' => content_length(body) 'Content-Length' => content_length(body)
} }
if printer==:pdf if printer==:pdf || printer ==:raw
filetype = printer filetype = printer
filename='profile_data' filename='profile_data'
headers['Content-Disposition'] = %(attachment; filename="#{filename}.#{filetype}") headers['Content-Disposition'] = %(attachment; filename="#{filename}.#{filetype}")
Expand Down

0 comments on commit 89ac2bd

Please sign in to comment.