This project is archived and is in readonly mode.
Fix for send_data Content-Length header in Ruby 1.9
Reported by Sava Chankov | May 17th, 2009 @ 05:27 PM | in 2.3.4
In Ruby 1.9 String#size returns the actual character length, not
size in bytes. send_data sets Content-Length header to length in
characters so when sending multi-byte encoded text the file gets
truncated. Example:
send_data("Кирилица", :type => text, :filename => 'utf8_text') # => the browser receives "Кири"
Here is a patch to fix this.
Comments and changes to this ticket
-
Sava Chankov May 17th, 2009 @ 11:34 PM
- no changes were found...
-
Repository August 2nd, 2009 @ 04:26 AM
- State changed from new to resolved
(from [ec94c2550dae463e646a18316bfcdaded9d140c9]) Ruby 1.9: fix Content-Length for multibyte send_data streaming
[#2661 state:resolved]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/ec94c2550dae463e646a18316bfcda... -
Repository August 2nd, 2009 @ 04:26 AM
(from [dc559f274fbd1ba180a785e741b9b2d7a7d09ae7]) Ruby 1.9: fix Content-Length for multibyte send_data streaming
[#2661 state:resolved]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/dc559f274fbd1ba180a785e741b9b2... -
Jeremy Kemper August 2nd, 2009 @ 04:27 AM
- Milestone changed from 2.x to 2.3.4
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 2661 Fix for send_data Content-Length header in Ruby 1.9 [#2661 state:resolved]
- 2661 Fix for send_data Content-Length header in Ruby 1.9 [#2661 state:resolved]