def guess_mime(ext)
      content_types = WEBrick::HTTPUtils::DefaultMimeTypes
      common_content_types = { 'ico' => 'image/x-icon' }
      content_types.merge!(common_content_types)
      content_types.each do |k, v|
        return v.to_s if ext.eql?(".#{k}")
      end
      nil
    end
def guess_mime(ext)
      content_types = WEBrick::HTTPUtils::DefaultMimeTypes
      common_content_types = { 'ico' => 'image/x-icon' }
      content_types.merge!(common_content_types)
      content_types.each do |k, v|
        return v.to_s if ext.eql?(".#{k}")
      end
      nil
    end
Guess content type based on file extension

 @param [String] ext File extension including dots

 @example Return mime type for extension '.png'
   guess_mime('favicon.png')

 @return [String] content-type value