prior / prawnto

a featureful rails plugin leveraging the new kickass prawn library to produce compiled pdf views
http://cracklabs.com/prawnto
MIT License
316 stars 101 forks source link

Fixed content-disposition error that occurs with filename set and new chrome version #16

Closed rylwin closed 11 years ago

rylwin commented 12 years ago

This fixes an issue where new version of Chrome 16.0.912.63 would give this error when passing a filename to prawnto:

Error 349 (net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION): Multiple Content-Disposition headers received. This is disallowed to protect against HTTP response splitting attacks

This error was resolved by wrapping the filename in the content-disposition header in quotes. WAS: "Content-Disposition"=>"attachment;filename=Name of your file.pdf"

NOW: "Content-Disposition"=>"attachment;filename=\"Name of your file.pdf\""