diff --git a/ChangeLog b/ChangeLog index be8433481c..15a1c6be1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Oct 25 04:46:53 2007 James Edward Gray II + + * lib/xmlrpc/client.rb (XMLRPC::Client#do_rpc): Improving the error + message for Content-Type check failures. [ruby-core:12163] + Wed Oct 25 03:45:08 2007 James Edward Gray II * lib/xmlrpc/utils.rb (XMLRPC::ParseContentType#parse_content_type): diff --git a/lib/xmlrpc/client.rb b/lib/xmlrpc/client.rb index 10f547b632..fca0725ed0 100644 --- a/lib/xmlrpc/client.rb +++ b/lib/xmlrpc/client.rb @@ -549,9 +549,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