From: Brian Candler Date: 2009-03-19T18:50:08+09:00 Subject: [ruby-core:22952] [Feature #855] HTTP/1.1 fixes and other enhancements to webrick Issue #855 has been updated by Brian Candler. There is an additional problem in setup_header, which prevents use of send_body_proc to stream bodies to HTTP/1.0 clients where no Content-Length has been set. elsif @header['content-length'].nil? unless @body.is_a?(IO) # <<<<< PROBLEM: Proc is not an IO! @header['content-length'] = @body ? @body.size : 0 end end I suggest something like this: elsif @header['content-length'].nil? if @body.nil? @header['content-length'] = 0 elsif @body.respond_to?(:size) @header['content-length'] = @body.size else @header['connection'] = 'close' end end ---------------------------------------- http://redmine.ruby-lang.org/issues/show/855 ---------------------------------------- http://redmine.ruby-lang.org