[前][次][番号順一覧][スレッド一覧]

ruby-changes:2276

From: ko1@a...
Date: 25 Oct 2007 04:48:26 +0900
Subject: [ruby-changes:2276] jeg2 - Ruby:r13768 (trunk): * lib/xmlrpc/client.rb (XMLRPC::Client#do_rpc): Improving the error

jeg2	2007-10-25 04:48:06 +0900 (Thu, 25 Oct 2007)

  New Revision: 13768

  Modified files:
    trunk/ChangeLog
    trunk/lib/xmlrpc/client.rb

  Log:
    * lib/xmlrpc/client.rb (XMLRPC::Client#do_rpc): Improving the error
      message for Content-Type check failures. [ruby-core:12163]


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/xmlrpc/client.rb?r1=13768&r2=13767
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13768&r2=13767

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 13767)
+++ ChangeLog	(revision 13768)
@@ -1,3 +1,8 @@
+Wed Oct 25 04:46:53 2007  James Edward Gray II  <jeg2@r...>
+
+	* 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  <jeg2@r...>
 
 	* lib/xmlrpc/utils.rb (XMLRPC::ParseContentType#parse_content_type):
Index: lib/xmlrpc/client.rb
===================================================================
--- lib/xmlrpc/client.rb	(revision 13767)
+++ lib/xmlrpc/client.rb	(revision 13768)
@@ -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
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]