Skip to content

Commit

Permalink
made Middleware call ruby 1.9 compatible. We must stop considering th…
Browse files Browse the repository at this point in the history
…e response body to be UTF-8, it is binary data so #lenght is not the right method to call
  • Loading branch information
Julien Palmas committed Jun 17, 2010
1 parent d075072 commit f5cf27c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pdfkit/middleware.rb
Expand Up @@ -27,7 +27,7 @@ def call(env)
headers.delete('ETag')
headers.delete('Cache-Control')

headers["Content-Length"] = body.length.to_s
headers["Content-Length"] = body.bytes.to_a.size.to_s
headers["Content-Type"] = "application/pdf"

response = [body]
Expand Down

0 comments on commit f5cf27c

Please sign in to comment.