def order(types) #:nodoc:
      types.map {|type| AcceptMediaType.new(type) }.reverse.sort.reverse.select {|type| type.valid? }.map {|type| type.range }
    end
def order(types) #:nodoc:
      types.map {|type| AcceptMediaType.new(type) }.reverse.sort.reverse.select {|type| type.valid? }.map {|type| type.range }
    end
Order media types by quality values, remove invalid types, and return media ranges.