From: Andy Lo A Foe Date: 2005-12-30T00:51:39+09:00 Subject: [PATCH] More robust content-type check: lib/xmlrpc/client.rb ------=_Part_11742_10019502.1135871487506 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, Trivial patch which dowcases the content-type before compare. This stops XML RPC clients from breaking when a server returns "text/XML" for example. -andy ------=_Part_11742_10019502.1135871487506 Content-Type: text/x-patch; name=client.rb.patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="client.rb.patch" --- client.rb 2005-12-29 16:46:55.000000000 +0100 +++ lib/xmlrpc/client.rb 2005-12-29 16:47:07.000000000 +0100 @@ -546,7 +546,7 @@ raise "HTTP-Error: #{resp.code} #{resp.message}" end - ct = parse_content_type(resp["Content-Type"]).first + ct = parse_content_type(resp["Content-Type"]).first.downcase if ct != "text/xml" if ct == "text/html" raise "Wrong content-type: \n#{data}" ------=_Part_11742_10019502.1135871487506--