From: James Edward Gray II Date: 2007-09-14T02:00:12+09:00 Subject: [PATCH] Improving XML-RPC Errors --Apple-Mail-1-942211859 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Attached is a trivial patch that just improves the error message returned when the XML-RPC client receives an unexpected content type. This is just to save some debugging time. James Edward Gray II --Apple-Mail-1-942211859 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=improve_xmlrpc_errors.patch Content-Disposition: attachment; filename=improve_xmlrpc_errors.patch Index: lib/xmlrpc/client.rb =================================================================== --- lib/xmlrpc/client.rb (revision 13439) +++ lib/xmlrpc/client.rb (working copy) @@ -549,9 +549,9 @@ 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 --Apple-Mail-1-942211859--