def _perform_content_negotiation
      if fmt = params[:format] and !fmt.blank?
        accepts = [fmt.to_sym]
      else
        accepts = _accept_types
      end

      provided_formats = _provided_formats
      
      specifics = accepts & provided_formats
      return specifics.first unless specifics.length == 0
      return provided_formats.first if accepts.include?(:all) && !provided_formats.empty?
      
      message  = "A format (%s) that isn't provided (%s) has been requested. "
      message += "Make sure the action provides the format, and be "
      message += "careful of before filters which won't recognize "
      message += "formats provided within actions."
      raise Merb::ControllerExceptions::NotAcceptable,
        (message % [accepts.join(', '), provided_formats.join(', ')])
    end
def _perform_content_negotiation
      if fmt = params[:format] and !fmt.blank?
        accepts = [fmt.to_sym]
      else
        accepts = _accept_types
      end

      provided_formats = _provided_formats
      
      specifics = accepts & provided_formats
      return specifics.first unless specifics.length == 0
      return provided_formats.first if accepts.include?(:all) && !provided_formats.empty?
      
      message  = "A format (%s) that isn't provided (%s) has been requested. "
      message += "Make sure the action provides the format, and be "
      message += "careful of before filters which won't recognize "
      message += "formats provided within actions."
      raise Merb::ControllerExceptions::NotAcceptable,
        (message % [accepts.join(', '), provided_formats.join(', ')])
    end
Do the content negotiation:
 1. if params[:format] is there, and provided, use it
 2. Parse the Accept header
 3. If it's */*, use the first provided format
 4. Look for one that is provided, in order of request
 5. Raise 406 if none found

 :api: private