# File lib/mongrel.rb, line 435 435: def send_file(path, small_file = false) 436: if small_file 437: File.open(path, "rb") {|f| @socket << f.read } 438: else 439: File.open(path, "rb") do |f| 440: while chunk = f.read(Const::CHUNK_SIZE) and chunk.length > 0 441: begin 442: write(chunk) 443: rescue Object => exc 444: break 445: end 446: end 447: end 448: end 449: @body_sent = true 450: end