diff options
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 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 |