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