Permalink
Browse files

Merge branch 'wip.allow-raw'

  • Loading branch information...
2 parents 9c0cd11 + a7ae4d8 commit 5611cbc360b936f7f161dd95aeb3fb8335b66443 @ConradIrwin ConradIrwin committed Jul 23, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/rack/perftools_profiler/profiler_middleware.rb
@@ -9,7 +9,8 @@ class ProfilerMiddleware
:text => 'text/plain',
:gif => 'image/gif',
:pdf => 'application/pdf',
- :callgrind => 'text/plain'
+ :callgrind => 'text/plain',
+ :raw => 'application/octet-stream'
}
PRINTERS = PRINTER_CONTENT_TYPE.keys
@@ -58,7 +59,7 @@ def headers(printer, body)
'Content-Type' => PRINTER_CONTENT_TYPE[printer],
'Content-Length' => content_length(body)
}
- if printer==:pdf
+ if printer ==:raw
filetype = printer
filename='profile_data'
headers['Content-Disposition'] = %(attachment; filename="#{filename}.#{filetype}")

0 comments on commit 5611cbc

Please sign in to comment.