Please review pull request #81: (#10562) Adds header so IE8 users can download nodes.csv opened by (djsauble2)
Description:
Due to IE8's idiosyncrasies, the following header is necessary
for its users to successfully download /nodes.csv
Cache-Control: must-revalidate, post-check=0, pre-check=0
Fixes: https://projects.puppetlabs.com/issues/10562
- Opened: Mon Jan 23 20:22:20 UTC 2012
- Based on: puppetlabs:master (7e7f0087470117f4e9d5bb2d21b1f0cd3f5fd85e)
- Requested merge: djsauble2:10562_ie8_csv_export (0eac8cccce2fad9213d219ac70d20973f3374ed0)
Diff follows:
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb
index cff2847..32ddf68 100644
--- a/app/controllers/nodes_controller.rb
+++ b/app/controllers/nodes_controller.rb
@@ -145,6 +145,7 @@ def scoped_index(*scope_names)
format.json { render :text => collection.to_json, :content_type => 'application/json' }
format.yaml { render :text => collection.to_yaml, :content_type => 'application/x-yaml' }
format.csv do
+ response["Cache-Control"] = 'must-revalidate, post-check=0, pre-check=0'
response["Content-Type"] = 'text/comma-separated-values;'
response["Content-Disposition"] = "attachment;filename=#{scope_names.join("-")}-nodes.csv;"
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
