diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-07 16:54:15 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-07 16:54:15 +0000 |
commit | d40bafa47ec2541ea5c3a633e1d475292f0874dd (patch) | |
tree | e21b44e3db14ac2e32617fb3890336e433ba9e0d /lib/xmlrpc/client.rb | |
parent | b296c4818c5b42fd11675f6cc8082be1a19e13bc (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_6@16907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/xmlrpc/client.rb')
-rw-r--r-- | lib/xmlrpc/client.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/xmlrpc/client.rb b/lib/xmlrpc/client.rb index 10f547b632..726945ea39 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 |