summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-20 08:51:02 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-20 08:51:02 +0000
commit5f7cd25ffd5c37bb9a7ff3eec83168500531d860 (patch)
tree2cab9853e5adf01f73b637d3de46aba9be3349ea
parenta5eca5dd0486503926482730602d94de7dd22c1f (diff)
* lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): add charset
information to content-type header.[ruby-core:5127] * lib/xmlrpc/server.rb (CGIServer::serve): ditto. * lib/xmlrpc/server.rb (ModRubyServer::serve): ditto. * lib/xmlrpc/server.rb (WEBrickServlet::service): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog11
-rw-r--r--lib/xmlrpc/client.rb2
-rw-r--r--lib/xmlrpc/server.rb6
3 files changed, 15 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 1b69a1d..6ed6298 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Tue Sep 20 17:48:34 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): add charset
+ information to content-type header.[ruby-core:5127]
+
+ * lib/xmlrpc/server.rb (CGIServer::serve): ditto.
+
+ * lib/xmlrpc/server.rb (ModRubyServer::serve): ditto.
+
+ * lib/xmlrpc/server.rb (WEBrickServlet::service): ditto.
+
Tue Sep 20 17:34:46 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* test/webrick/test_cgi.rb: set ENV["PATH"] to CGIEnvPath on
diff --git a/lib/xmlrpc/client.rb b/lib/xmlrpc/client.rb
index 074f501..dadd327 100644
--- a/lib/xmlrpc/client.rb
+++ b/lib/xmlrpc/client.rb
@@ -500,7 +500,7 @@ module XMLRPC
def do_rpc(request, async=false)
header = {
"User-Agent" => USER_AGENT,
- "Content-Type" => "text/xml",
+ "Content-Type" => "text/xml; charset=utf-8",
"Content-Length" => request.size.to_s,
"Connection" => (async ? "close" : "keep-alive")
}
diff --git a/lib/xmlrpc/server.rb b/lib/xmlrpc/server.rb
index 788abc2..f2dad89 100644
--- a/lib/xmlrpc/server.rb
+++ b/lib/xmlrpc/server.rb
@@ -456,7 +456,7 @@ class CGIServer < BasicServer
http_error(400, "Bad Request") if data.nil? or data.size != length
- http_write(process(data), "Content-type" => "text/xml")
+ http_write(process(data), "Content-type" => "text/xml; charset=utf-8")
}
end
@@ -531,7 +531,7 @@ class ModRubyServer < BasicServer
http_error(400, "Bad Request") if data.nil? or data.size != length
- http_write(process(data), 200, "Content-type" => "text/xml")
+ http_write(process(data), 200, "Content-type" => "text/xml; charset=utf-8")
}
end
@@ -764,7 +764,7 @@ class WEBrickServlet < BasicServer
response.status = 200
response['Content-Length'] = resp.size
- response['Content-Type'] = "text/xml"
+ response['Content-Type'] = "text/xml; charset=utf-8"
response.body = resp
end
end