aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmlrpc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xmlrpc')
-rw-r--r--lib/xmlrpc/client.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/xmlrpc/client.rb b/lib/xmlrpc/client.rb
index 8d899bc600..a75067ab8b 100644
--- a/lib/xmlrpc/client.rb
+++ b/lib/xmlrpc/client.rb
@@ -556,7 +556,9 @@ module XMLRPC
raise "HTTP-Error: #{resp.code} #{resp.message}"
end
- ct = parse_content_type(resp["Content-Type"]).first
+ # assume text/xml on instances where Content-Type header is not set
+ ct_expected = resp["Content-Type"] || 'text/xml'
+ ct = parse_content_type(ct_expected).first
if ct != "text/xml"
if ct == "text/html"
raise "Wrong content-type (received '#{ct}' but expected 'text/xml'): \n#{data}"