if not ENV['HTTP_ACCEPT'].to_s.include?("application/xhtml+xml") contenttype = "text/html" else contenttype = "application/xhtml+xml" end