- @performed_render = false
-
- if options[:stream]
- render :status => options[:status], :text => Proc.new { |response, output|
- logger.info "Streaming file #{file.path}" unless logger.nil?
- len = options[:buffer_size] || 4096
- while buf = file.read(len)
- output.write(buf)
- end
- }
- else
- logger.info "Sending file #{file.path}" unless logger.nil?
- render :status => options[:status], :text => file.read
- end
+ self.status = options[:status] || 200
+ self.content_type = options[:content_type] if options.key?(:content_type)
+ self.response_body = file