aboutsummaryrefslogtreecommitdiffstats
path: root/lib/webrick
diff options
context:
space:
mode:
Diffstat (limited to 'lib/webrick')
-rw-r--r--lib/webrick/httpproxy.rb2
-rw-r--r--lib/webrick/httpservlet/cgihandler.rb3
-rw-r--r--lib/webrick/httpservlet/erbhandler.rb2
-rw-r--r--lib/webrick/server.rb2
4 files changed, 3 insertions, 6 deletions
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