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

ruby-changes:5403

From: shyouhei <ko1@a...>
Date: Sun, 8 Jun 2008 01:52:46 +0900 (JST)
Subject: [ruby-changes:5403] Ruby:r16905 (ruby_1_8_5): merge revision(s) 13771:

shyouhei	2008-06-08 01:52:33 +0900 (Sun, 08 Jun 2008)

  New Revision: 16905

  Modified files:
    branches/ruby_1_8_5/ChangeLog
    branches/ruby_1_8_5/lib/xmlrpc/client.rb
    branches/ruby_1_8_5/lib/xmlrpc/parser.rb
    branches/ruby_1_8_5/lib/xmlrpc/utils.rb
    branches/ruby_1_8_5/version.h

  Log:
    merge revision(s) 13771:
    Merged 13767, 13768, 13769, and 13770 from trunk.
    * lib/xmlrpc/parser.rb (XMLRPC::Convert::dateTime): Fixing a bug that
      caused time zone conversion to fail for some ISO 8601 date formats.
      [ruby-Bugs-12677]
    * lib/xmlrpc/client.rb (XMLRPC::Client#do_rpc): Explicitly start
      the HTTP connection to support keepalive requests. [ruby-Bugs-9353]
    * lib/xmlrpc/client.rb (XMLRPC::Client#do_rpc): Improving the error
      message for Content-Type check failures. [ruby-core:12163]
    * lib/xmlrpc/utils.rb (XMLRPC::ParseContentType#parse_content_type):
      Making Content-Type checks case insensitive. [ruby-Bugs-3367]


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/lib/xmlrpc/client.rb?r1=16905&r2=16904&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/version.h?r1=16905&r2=16904&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/lib/xmlrpc/parser.rb?r1=16905&r2=16904&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/lib/xmlrpc/utils.rb?r1=16905&r2=16904&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/ChangeLog?r1=16905&r2=16904&diff_format=u

Index: ruby_1_8_5/ChangeLog
===================================================================
--- ruby_1_8_5/ChangeLog	(revision 16904)
+++ ruby_1_8_5/ChangeLog	(revision 16905)
@@ -1,3 +1,20 @@
+Sun Jun  8 01:51:52 2008  James Edward Gray II  <jeg2@r...>
+
+	Merged 13767, 13768, 13769, and 13770 from trunk.
+
+	* lib/xmlrpc/parser.rb (XMLRPC::Convert::dateTime): Fixing a bug that
+	  caused time zone conversion to fail for some ISO 8601 date formats.
+	  [ruby-Bugs-12677]
+
+	* lib/xmlrpc/client.rb (XMLRPC::Client#do_rpc): Explicitly start
+	  the HTTP connection to support keepalive requests. [ruby-Bugs-9353]
+
+	* lib/xmlrpc/client.rb (XMLRPC::Client#do_rpc): Improving the error
+	  message for Content-Type check failures. [ruby-core:12163]
+
+	* lib/xmlrpc/utils.rb (XMLRPC::ParseContentType#parse_content_type):
+	  Making Content-Type checks case insensitive. [ruby-Bugs-3367]
+
 Sun Jun  8 01:45:27 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* marshal.c (r_bytes0): refined length check.  [ruby-dev:32059]
Index: ruby_1_8_5/version.h
===================================================================
--- ruby_1_8_5/version.h	(revision 16904)
+++ ruby_1_8_5/version.h	(revision 16905)
@@ -2,7 +2,7 @@
 #define RUBY_RELEASE_DATE "2008-06-08"
 #define RUBY_VERSION_CODE 185
 #define RUBY_RELEASE_CODE 20080608
-#define RUBY_PATCHLEVEL 136
+#define RUBY_PATCHLEVEL 137
 
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 8
Index: ruby_1_8_5/lib/xmlrpc/client.rb
===================================================================
--- ruby_1_8_5/lib/xmlrpc/client.rb	(revision 16904)
+++ ruby_1_8_5/lib/xmlrpc/client.rb	(revision 16905)
@@ -530,6 +530,9 @@
         }
       else
         # reuse the HTTP object for each call => connection alive is possible
+        # we must start connection explicitely first time so that http.request
+        # does not assume that we don't want keepalive
+        @http.start if not @http.started?
         
         # post request
         resp = @http.post2(@path, request, header) 
@@ -549,9 +552,9 @@
       ct = parse_content_type(resp["Content-Type"]).first
       if ct != "text/xml"
         if ct == "text/html"
-          raise "Wrong content-type: \n#{data}"
+          raise "Wrong content-type (received '#{ct}' but expected 'text/xml'): \n#{data}"
         else
-          raise "Wrong content-type"
+          raise "Wrong content-type (received '#{ct}' but expected 'text/xml')"
         end
       end
 
Index: ruby_1_8_5/lib/xmlrpc/utils.rb
===================================================================
--- ruby_1_8_5/lib/xmlrpc/utils.rb	(revision 16904)
+++ ruby_1_8_5/lib/xmlrpc/utils.rb	(revision 16905)
@@ -157,7 +157,7 @@
   module ParseContentType
     def parse_content_type(str)
       a, *b = str.split(";")
-      return a.strip, *b
+      return a.strip.downcase, *b
     end
   end
 
Index: ruby_1_8_5/lib/xmlrpc/parser.rb
===================================================================
--- ruby_1_8_5/lib/xmlrpc/parser.rb	(revision 16904)
+++ ruby_1_8_5/lib/xmlrpc/parser.rb	(revision 16905)
@@ -92,7 +92,7 @@
         if $7
           ofs = $8.to_i*3600 + $9.to_i*60
           ofs = -ofs if $7=='+'
-          utc = Time.utc(a.reverse) + ofs
+          utc = Time.utc(*a) + ofs
           a = [ utc.year, utc.month, utc.day, utc.hour, utc.min, utc.sec ]
         end
         XMLRPC::DateTime.new(*a)
@@ -106,7 +106,7 @@
         if $7
           ofs = $8.to_i*3600 + $9.to_i*60
           ofs = -ofs if $7=='+'
-          utc = Time.utc(a.reverse) + ofs
+          utc = Time.utc(*a) + ofs
           a = [ utc.year, utc.month, utc.day, utc.hour, utc.min, utc.sec ]
         end
         XMLRPC::DateTime.new(*a)

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

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