diff options
Diffstat (limited to 'lib/mongrel/handlers.rb')
-rw-r--r-- | lib/mongrel/handlers.rb | 8 |
1 files changed, 5 insertions, 3 deletions
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 |