# File lib/mongrel.rb, line 404
404:     def send_file(path)
405:       File.open(path, "rb") do |f|
406:         if @socket.respond_to? :sendfile
407:           begin
408:             @socket.sendfile(f)
409:           rescue => details
410:             socket_error(details)
411:           end
412:         else
413:           while chunk = f.read(Const::CHUNK_SIZE) and chunk.length > 0
414:             write(chunk)
415:           end
416:         end
417:         @body_send = true
418:       end
419:     end