lib/simple_captcha/middleware.rb in glebtv-simple_captcha-0.6.0 vs lib/simple_captcha/middleware.rb in glebtv-simple_captcha-0.6.1
- old
+ new
@@ -44,10 +44,15 @@
end
options[:filename] ||= File.basename(path) unless options[:url_based_filename]
status = options[:status] || 200
- headers = {"Content-Disposition" => "#{options[:disposition]}; filename='#{options[:filename]}'", "Content-Type" => options[:type], 'Content-Transfer-Encoding' => 'binary', 'Cache-Control' => 'private'}
+ headers = {
+ "Content-Disposition" => "#{options[:disposition]}; filename='#{options[:filename]}'",
+ # "Content-Type" => options[:type],
+ 'Content-Transfer-Encoding' => 'binary',
+ 'Cache-Control' => 'private'
+ }
response_body = [File.open(path, "rb").read]
File.delete(path)
[status, headers, response_body]
end