[前][次][番号順一覧][スレッド一覧]

ruby-changes:30382

From: usa <ko1@a...>
Date: Fri, 9 Aug 2013 15:58:02 +0900 (JST)
Subject: [ruby-changes:30382] usa:r42461 (ruby_1_9_3): * lib/net/http.rb (Net::HTTP#send_request_with_body_stream): use

usa	2013-08-09 15:57:52 +0900 (Fri, 09 Aug 2013)

  New Revision: 42461

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42461

  Log:
    * 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].

  Modified files:
    branches/ruby_1_9_3/ChangeLog
    branches/ruby_1_9_3/lib/net/http.rb
    branches/ruby_1_9_3/version.h
Index: ruby_1_9_3/ChangeLog
===================================================================
--- ruby_1_9_3/ChangeLog	(revision 42460)
+++ ruby_1_9_3/ChangeLog	(revision 42461)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/ChangeLog#L1
+Fri Aug  9 15:56:05 2013  NAKAMURA Usaku  <usa@r...>
+
+	* 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].
+
 Fri Aug  9 15:50:11 2013  NAKAMURA Usaku  <usa@r...>
 
 	* win32/win32.c (wrename): use MoveFileExW instead of MoveFileW,
Index: ruby_1_9_3/lib/net/http.rb
===================================================================
--- ruby_1_9_3/lib/net/http.rb	(revision 42460)
+++ ruby_1_9_3/lib/net/http.rb	(revision 42461)
@@ -1948,7 +1948,7 @@ module Net   #:nodoc: https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/lib/net/http.rb#L1948
       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
Index: ruby_1_9_3/version.h
===================================================================
--- ruby_1_9_3/version.h	(revision 42460)
+++ ruby_1_9_3/version.h	(revision 42461)
@@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/version.h#L1
 #define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 461
+#define RUBY_PATCHLEVEL 462
 
 #define RUBY_RELEASE_DATE "2013-08-09"
 #define RUBY_RELEASE_YEAR 2013

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]