Permalink
Browse files

Fix multipart uploads on 1.9

  • Loading branch information...
1 parent 40eba67 commit 44ed4640f077504a49b7f1cabf8d6ad7a13f6441 @raggi raggi committed Apr 28, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/rack/utils.rb
View
@@ -1,3 +1,5 @@
+# coding=binary
+
require 'set'
require 'tempfile'
@@ -351,7 +353,7 @@ def self.parse_multipart(env)
input = env['rack.input']
input.rewind
- boundary_size = boundary.size + EOL.size
+ boundary_size = Utils.bytesize(boundary) + EOL.size
bufsize = 16384
content_length -= boundary_size

9 comments on commit 44ed464

Contributor

josh replied Apr 29, 2009

Omg, that was its! I totally looked over it.

Can you please cherry-pick this into 1-0-stable.

Owner

raggi replied Apr 29, 2009

Sure

When do you release a new rack version? This patch is still not included in a stable version

+1 to a 1.0.1 release with this patch $)

Yes, please release a 1.0.1 asap. This is a pretty important fix!

Also +1 to getting this out ASAP.

+1, this is pretty important.

+1 for this one. Otherwise paperclip uploads die in Ruby 1.9.

Please sign in to comment.