From cc3350f118d60fe5ccd254cbe3e6b5e6e0ee3916 Mon Sep 17 00:00:00 2001 From: gotoyuzo Date: Mon, 7 Jan 2008 11:40:41 +0000 Subject: [PATCH] * lib/webrick/httpservlet/cgihandler.rb: external encoding of tempfiles is set to "ASCII-8BIT". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/webrick/httpservlet/cgihandler.rb | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 97161338df..1a15f0a44a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jan 7 20:37:55 2008 GOTOU Yuuzou + + * lib/webrick/httpservlet/cgihandler.rb: external encoding of + tempfiles is set to "ASCII-8BIT". + Mon Jan 7 19:39:50 2008 Eric Hodel * lib/rdoc/template.rb: Use ERB instead of custom template language. diff --git a/lib/webrick/httpservlet/cgihandler.rb b/lib/webrick/httpservlet/cgihandler.rb index c6583c5a33..0df3417e4a 100644 --- a/lib/webrick/httpservlet/cgihandler.rb +++ b/lib/webrick/httpservlet/cgihandler.rb @@ -35,7 +35,9 @@ module WEBrick cgi_in = IO::popen(@cgicmd, "wb") cgi_out = Tempfile.new("webrick.cgiout.", @tempdir) + cgi_out.set_encoding("ASCII-8BIT") cgi_err = Tempfile.new("webrick.cgierr.", @tempdir) + cgi_err.set_encoding("ASCII-8BIT") begin cgi_in.sync = true meta = req.meta_vars