# File lib/mongrel.rb, line 404 def send_file(path) File.open(path, "rb") do |f| if @socket.respond_to? :sendfile begin @socket.sendfile(f) rescue => details socket_error(details) end else while chunk = f.read(Const::CHUNK_SIZE) and chunk.length > 0 write(chunk) end end @body_send = true end end