# File lib/mongrel.rb, line 540 540: def send_file(req, response) 541: response.start(200) do |head,out| 542: # set the mime type from our map based on the ending 543: dot_at = req.rindex(".") 544: if dot_at 545: ext = req[dot_at .. -1] 546: if MIME_TYPES[ext] 547: head['Content-Type'] = MIME_TYPES[ext] 548: end 549: end 550: 551: open(req, "rb") do |f| 552: out.write(f.read) 553: end 554: end 555: end