From 5ee60048088ec5e6dbe1aa558cefa24a488b495c Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 9 Aug 2013 06:57:52 +0000 Subject: * lib/net/http.rb (Net::HTTP#send_request_with_body_stream): use String#bytesize instead of String#length. reported by shekhei (shek hei wong) at [ruby-core:53775] [Backport #8176]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@42461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/net/http.rb b/lib/net/http.rb index 9e4fe6a120..67de15cd27 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1948,7 +1948,7 @@ module Net #:nodoc: wait_for_continue sock, ver if sock.continue_timeout if chunked? while s = f.read(1024) - sock.write(sprintf("%x\r\n", s.length) << s << "\r\n") + sock.write(sprintf("%x\r\n", s.bytesize) << s << "\r\n") end sock.write "0\r\n\r\n" else -- cgit v1.2.3