summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 16:52:33 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 16:52:33 +0000
commit718f7f3b1dadab9e9cbc037b2c57369cf682f0c1 (patch)
treea90fcc056279aa2e448dc2298abbb07cfe840139
parente782b42f18f3ac7e5788c5be83048004ff51fa6f (diff)
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@16905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog17
-rw-r--r--lib/xmlrpc/client.rb7
-rw-r--r--lib/xmlrpc/parser.rb4
-rw-r--r--lib/xmlrpc/utils.rb2
-rw-r--r--version.h2
5 files changed, 26 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 62c6ace223..c75712c5ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+Sun Jun 8 01:51:52 2008 James Edward Gray II <jeg2@ruby-lang.org>
+
+ 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@ruby-lang.org>
* marshal.c (r_bytes0): refined length check. [ruby-dev:32059]
diff --git a/lib/xmlrpc/client.rb b/lib/xmlrpc/client.rb
index 4d23e31e3e..b3682f6b09 100644
--- a/lib/xmlrpc/client.rb
+++ b/lib/xmlrpc/client.rb
@@ -530,6 +530,9 @@ module XMLRPC
}
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 @@ module XMLRPC
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
diff --git a/lib/xmlrpc/parser.rb b/lib/xmlrpc/parser.rb
index e4f21edec6..7490f34e84 100644
--- a/lib/xmlrpc/parser.rb
+++ b/lib/xmlrpc/parser.rb
@@ -92,7 +92,7 @@ module XMLRPC
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 @@ module XMLRPC
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)
diff --git a/lib/xmlrpc/utils.rb b/lib/xmlrpc/utils.rb
index b0a4a0d987..2b51083c78 100644
--- a/lib/xmlrpc/utils.rb
+++ b/lib/xmlrpc/utils.rb
@@ -157,7 +157,7 @@ module XMLRPC
module ParseContentType
def parse_content_type(str)
a, *b = str.split(";")
- return a.strip, *b
+ return a.strip.downcase, *b
end
end
diff --git a/version.h b/version.h
index 35a420b092..984ad725a6 100644
--- a/version.h
+++ b/version.h
@@ -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