# File lib/puppet/network/http/handler.rb, line 28
28:   def format_to_use(request)
29:     unless header = accept_header(request)
30:       raise ArgumentError, "An Accept header must be provided to pick the right format"
31:     end
32: 
33:     format = nil
34:     header.split(/,\s*/).each do |name|
35:       next unless format = Puppet::Network::FormatHandler.format(name)
36:       next unless format.suitable?
37:       return format
38:     end
39: 
40:     raise "No specified acceptable formats (#{header}) are functional on this machine"
41:   end