# File lib/merb-core/controller/mixins/responder.rb, line 371
    def self.parse(accept_header)
      list = accept_header.to_s.split(/,/).enum_for(:each_with_index).map do |entry,index|
        AcceptType.new(entry,index += 1)
      end.sort.uniq
      # firefox (and possibly other browsers) send broken default accept headers.
      # fix them up by sorting alternate xml forms (namely application/xhtml+xml)
      # ahead of pure xml types (application/xml,text/xml).
      if app_xml = list.detect{|e| e.super_range == 'application/xml'}
        list.select{|e| e.to_s =~ /\+xml/}.each { |acc_type|
          list[list.index(acc_type)],list[list.index(app_xml)] = 
            list[list.index(app_xml)],list[list.index(acc_type)] }
      end
      list
    end