diff options
-rw-r--r-- | lib/mongrel.rb | 6 | ||||
-rw-r--r-- | lib/mongrel/handlers.rb | 8 |
2 files changed, 6 insertions, 8 deletions
diff --git a/lib/mongrel.rb b/lib/mongrel.rb index c2dfc3b..68e878a 100644 --- a/lib/mongrel.rb +++ b/lib/mongrel.rb @@ -420,11 +420,7 @@ module Mongrel data << client.readpartial(Const::CHUNK_SIZE) end end - rescue EOFError - # ignored - rescue Errno::ECONNRESET - # ignored - rescue Errno::EPIPE + rescue EOFError,Errno::ECONNRESET,Errno::EPIPE,Errno::EINVAL # ignored rescue => details STDERR.puts "ERROR(#{details.class}): #{details}" diff --git a/lib/mongrel/handlers.rb b/lib/mongrel/handlers.rb index b0f77a8..1b2a7d4 100644 --- a/lib/mongrel/handlers.rb +++ b/lib/mongrel/handlers.rb @@ -181,9 +181,11 @@ module Mongrel else File.open(req, "rb") { |f| response.socket.write(f.read) } end - rescue Errno::EINVAL - # ignore these since it means the client closed off early on win32 + rescue EOFError,Errno::ECONNRESET,Errno::EPIPE + # ignore these since it means the client closed off early end + else + response.send_body # should send nothing end end @@ -210,7 +212,7 @@ module Mongrel response.start(403) {|head,out| out.write("Only HEAD and GET allowed.") } end rescue => details - STDERR.puts "Error accessing file: #{details}" + STDERR.puts "Error accessing file #{req}: #{details}" STDERR.puts details.backtrace.join("\n") end end |