diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/webrick/httpproxy.rb | 2 | ||||
-rw-r--r-- | lib/webrick/httpservlet/cgihandler.rb | 3 | ||||
-rw-r--r-- | lib/webrick/httpservlet/erbhandler.rb | 2 | ||||
-rw-r--r-- | lib/webrick/server.rb | 2 |
5 files changed, 10 insertions, 6 deletions
@@ -1,3 +1,10 @@ +Thu Jun 26 17:57:57 2014 SHIBATA Hiroshi <[email protected]> + + * lib/webrick/httpproxy.rb: remvoe useless assigned variables. + * lib/webrick/httpservlet/cgihandler.rb: ditto. + * lib/webrick/httpservlet/erbhandler.rb: ditto. + * lib/webrick/server.rb: ditto. + Thu Jun 26 08:28:01 2014 Nobuyoshi Nakada <[email protected]> * hash.c (env_select): fix memory leak and crash on Windows, make diff --git a/lib/webrick/httpproxy.rb b/lib/webrick/httpproxy.rb index 4ff565754e..77a2ea7108 100644 --- a/lib/webrick/httpproxy.rb +++ b/lib/webrick/httpproxy.rb @@ -203,7 +203,7 @@ module WEBrick ua.syswrite(buf) end end - rescue => ex + rescue os.close @logger.debug("CONNECT #{host}:#{port}: closed") end diff --git a/lib/webrick/httpservlet/cgihandler.rb b/lib/webrick/httpservlet/cgihandler.rb index 7c012ca64b..32100418e6 100644 --- a/lib/webrick/httpservlet/cgihandler.rb +++ b/lib/webrick/httpservlet/cgihandler.rb @@ -41,9 +41,6 @@ module WEBrick # :stopdoc: def do_GET(req, res) - data = nil - status = -1 - cgi_in = IO::popen(@cgicmd, "wb") cgi_out = Tempfile.new("webrick.cgiout.", @tempdir, mode: IO::BINARY) cgi_out.set_encoding("ASCII-8BIT") diff --git a/lib/webrick/httpservlet/erbhandler.rb b/lib/webrick/httpservlet/erbhandler.rb index 34b4b9e68b..1b8a82d67b 100644 --- a/lib/webrick/httpservlet/erbhandler.rb +++ b/lib/webrick/httpservlet/erbhandler.rb @@ -56,7 +56,7 @@ module WEBrick res.body = evaluate(ERB.new(data), req, res) res['content-type'] ||= HTTPUtils::mime_type(@script_filename, @config[:MimeTypes]) - rescue StandardError => ex + rescue StandardError raise rescue Exception => ex @logger.error(ex) diff --git a/lib/webrick/server.rb b/lib/webrick/server.rb index ca22f85ae9..7a3632b0b5 100644 --- a/lib/webrick/server.rb +++ b/lib/webrick/server.rb @@ -288,7 +288,7 @@ module WEBrick Utils::set_non_blocking(sock) Utils::set_close_on_exec(sock) rescue Errno::ECONNRESET, Errno::ECONNABORTED, - Errno::EPROTO, Errno::EINVAL => ex + Errno::EPROTO, Errno::EINVAL rescue StandardError => ex msg = "#{ex.class}: #{ex.message}\n\t#{ex.backtrace[0]}" @logger.error msg |