Ticket #7224: fix_in_place_editor_and_set_content_length.diff
| File fix_in_place_editor_and_set_content_length.diff, 0.8 kB (added by jeremymcanally, 2 years ago) |
|---|
-
actionpack/lib/action_controller/cgi_process.rb
old new 224 224 # Don't set the Content-Length for block-based bodies as that would mean reading it all into memory. Not nice 225 225 # for, say, a 2GB streaming file. 226 226 def set_content_length! 227 @headers["Content-Length"] = @body.size unless @body.respond_to?(:call) 227 if (@body.respond_to?(:size)) 228 @headers["Content-Length"] = @body.size 229 else 230 @headers["Content-Length"] = @body.to_s.size 231 end unless @body.respond_to?(:call) 228 232 end 229 233 end 230 234 end